Opinions: best IDE for module-based Java?

It’s been a couple years now since Java 9 introduced modules. How are IDE’s doing in terms of handling modules? Any thoughts on which is doing it best?

My experience is only with Eclipse. It’s made definite progress. I no longer avoid having a module-info file, and with that working, no longer need to put in a VM argument providing the JavaFX module path in the run configurations. Eclipse now provides meaningful error statements for helping keep the module-info file in order. I was just working with an old JavaFX tutorial (learning about creating a new control), and the IDE provided clear and easy-to-implement error messages on how to modify the module-info file. I was able to get the code up and running using OpenJDK 11 and JavaFX 14.

But I don’t know how well Eclipse works with creating jar files that can run module-based Java on other peoples systems, especially if JavaFX is involved. Use of JLINK to create a self-contained app seems the only way to make that work, or has something been figured out? And Eclipse doesn’t handle JLINKing yet, AFAIK. Do other IDEs?

1 Like

I’m still avoiding it, largely due to how awful Eclipse is, but to be honest it’s trying to make the best of a fucking terrible idea in the first place.

Cas :slight_smile:

I’ve also yet to hear any actual reason why anyone should use Java 9 / Jigsaw modules. And I am not talking about modularizing your application/system. That IS a good idea. I am talking about using the Jigsaw module system to do so.
So far, Jigsaw has created nothing but confusion about modulepath/classpath and what exactly is visible/effective in which circumstance and how to configure the module-info.java file appropriately.
We already have good and very mature mechanisms for modularization: think Maven artifacts. And if you want/need to take it further, by restricting visibility to individual packages, then there is OSGi, which has been used for ages now in the industry.
Jigsaw might be a good thing for modularizing the JDK itself, but then again you can argue: So what? You can build a shrunk-down JRE with jlink encompassing only what you need and weighing in at maybe 50 MB, compared to simply distributing a whole JRE with 150MB? Cutting down 100MB on the wire and on disk space is absolutely no argument for me anymore.

2 Likes

Another bummer is that us folks who’re dependent on Android SDK cannot go past Java 8. Gradle version is tied to the version of Android Gradle plugin, and it won’t launch on latest Gradle versions, and hence no support for Java 9+.

One more reason to stay on Java 8. Another reason is Kotlin. It allows to generate Java 7 bytecode with all modern language features, and just works out of the box. For modules, we have Gradle sub-projects as modules (equivalent of Maven artifacts) and works pretty decent.

1 Like

I got the original demo of Alien Flux down to - get this - under 5MB. Think about that for a moment.

1 Like

Not impressed, because who cares? Unless you have any figures showing that potential players are less likely to install a game that weighs in at 50MB compared to 5MB for the same game - given that people nowadays load tens of gigabytes… for a single game.

I think size still matters in mobile environments. I often see clients crying for an addition of ~1 MB to their app size. However, in desktop environments, there is no reason to consider this.

Yeah, but then: In mobile development you don’t need to ship a whole runtime environment as part of your game. The runtime is on the phone already.

I guess my initial point is also only valid in the context of games development. I totally see why people would in the context of function-as-a-service/serverless try to keep their deployments small.

It was more of a data point as to how small a VM can be. And also how the problem was totally solved 17 years ago.

Btw 17 years ago there was actually concrete data that showed that 5mb was the cutoff beyond which sales would start to plummet.

3 Likes

Sounds like the antipathy to modular Java is bigger than the question of how well different IDE’s handle it. I remain curious about how NetBeans and IntelliJ are coping, what features they have, and if done better than Eclipse. I’ve heard there are other IDE’s out there as well, but know next to nothing about them.

I saw that C++ has passed Java again on Tiobe. Articles covering this tend to emphasize positive aspects of C++, and not look at the rate at which Java is dropping. The latter seems a lot more significant to me in putting us second. I’m wondering to what extent these stats (unclear to me how they relate to actual usage) are related to people being discouraged by the modular aspects adding complexity. A selling point of Java over C++ was the ability to avoid headaches caused by the latter. That advantage is slipping away?

I suspect that the drop in popularity of Java has to do with speeding up the language and trying to put a bunch of new stuff in it, while taking out backwards compatibility for old stuff and also basically abandoning the rather easy IDE of Netbeans. It is a real shame too because the cross-platform capability of Java always appealed to me.

I just took a look at the NetBeans site. This recap of the history looks pretty healthy to me. The current version, 12.1 has just been released. Was there something about the IDE that was lost along the way?

Netbeans was in a sorry state when it first moved to Apache. It didn’t even come with an installer until very recently. I know because I moved into a new computer last year and after manually installing it I couldn’t start it without editing configuration scripts that required instructions from stackoverflow.
I’m glad to see it going better now. I suppose it just took a while for the Apache folks to integrate into their systems.
I only use netbeams over eclipse because I’m more familiar with it. But one day I’ll have to move over to eclipse since Android development and libGDX seem to require it.

I suspect that the drop in popularity of Java has to do with speeding up the language and trying to put a bunch of new stuff in it

Yes I agree, the language is no longer as simple and elegant as it was. While most new features can be ignored in your own libraries, trying to read and extend others’ code is a bit of a nightmare. The mess began with generics which were implemented in a backwards-compatible way that significantly added to the complexity. I still suffer when trying to comprehend why my extension of a generified class won’t compile.
That said, Javascript gets more and more popular despite it being such a total mess it’s shocking.
Probably the reason why Java is falling in popularity is that it just can’t easily be run on the browser any more (without using GWT or JSweet) since applets are dead and the client side libraries such as Swing and JavaFX have been moth-balled or abandoned by Oracle.

1 Like

Android development no longer supports Eclipse. Google is going all the deep it can to persuade users to use their Android Studio which is a rebranded version of IntelliJ IDEA.

Best bet right now is to use IntelliJ IDEA Community edition, which is pretty much a beast when compared to Eclipse.

3 Likes