So like has anyone actually figured out how to deploy projects in Java9+ yet

We’ve been trying to and I’ve tried literally every official and open JDK from 9 and up, and every time I manage to get one aspect working another breaks. We just had to downgrade to JDK8 for like the billionth time today so that we could actually get some test programs out to other team members who needed them. This coupled with the fact that Eclipse is also progressively getting worse is really making this a bad time to be a Java developer.

Just wanted to find out how everyone else is doing and if they’re running into any of these issues with their projects? Along with any personal workflows for getting past how annoying a lot of this is.

I am deploying ReferenceNoteKeyboard from itch.io for both Windows and MacOS, and it uses OpenFX 11 and OpenJDK 11. It was developed in Eclipse and makes use of a jlink-built jvm.

I also was able to take an old project of CommanderKeith’s and build him a jlink-based version, and he has reported that he has run it successfully on multiple Windows systems. (All 64-bit, though.) I wrote about it here. I’m not sure but I think the basic approach could also work if you have your Eclipse project set up with the “unnamed module” (the default that accesses all the modules) and build a jar from that, and then go through the steps in the tutorial that is linked on that page. Should test that when I get a chance! Maybe someone else will?

The best way to set up projects on Eclipse isn’t at all clear to me. What I’m doing kind of works but I don’t feel like I totally understand. Anyway, here is what I’ve done:

For a given project, I include JavaFX11 as a Build Configurations/Library, in the ModulePath. I also make extensive use of another project (my audio engine), and put that in as a Project on the ClassPath. Neither project is set up to refer to a module-info. But I have added the following argument to the run configuration/VM arguments:

--module-path "c:\Program Files\Java\javafx-jmods-11.0.1" --add-modules=javafx.controls

If the program uses more of JavaFX, then additional javafx modules have to be in the add-modules list, comma separated, e.g., javafx.media, javafx.graphics

When I export from Eclipse, I use the simple export jar option of just source code, and then work from CMD.com, i.e., build a module-info with notepad, and do command line compiling. (I’m using the basic steps written about here but these could be updated for when JavaFX is included.

I’m pretty sure there are better ways, that will make smarter use of Eclipse, but the above does work, afaik.

But I do agree that this is a lot of info scattered here and there and kind of a klooj. It would be good to have some basic guide oriented to the game programmer.

That’s actually some useful information philfrei. As weird as it sounds, I’m almost glad to know that even talented developers like yourself are having some issues. I’ll try and test that when I get the chance with Clear since it’s pretty small and might be a good way to see if that works. I’d love to see more posts like yours in the thread.

I don’t think that I’m much of developer compared to others here, but thanks for the compliment. I’m mostly self-taught, have a lot of knowledge holes, and have generally avoided issues pertaining to configuration. For example, even doing simple things with the dos shell was a challenge (when deciding to just try and get a simple command-line workflow going). “Some issues” is putting it mildly. Months of thrashing has included trying to work through the Oracle/Java Deployment Guide and getting quite frustrated. Very vexing about that documentation: no example of deploying a jlink project. Yes examples of jlink, yes examples of various deployments, but for some reason, no example combining both.

Sounds good. If you can get the code to run under Java 11, and then make a jar for that using the “unnamed module”, then, figure out what you would need in a module-info for the project (using jdefs). With that info it should be possible to build a custom jvm for running the project. If you run into any hitches, I’ll be happy to try and help.

Agreed. But we may have to provide leadership here.

I think one of the problems is how inconsistent it feels. Like the whole reason I started this thread was out of frustration that the workflow I had made (and thought finally worked) didn’t work with NNGINE/Robot Farm even though I had seemingly gotten it to work with Clear. I just don’t know man.

What did you try? How did it break down?

I honestly don’t even remember what the particular issue was that made me toasty enough to make this thread. But it was enough to make me abandon ship entirely and move over to IntelliJ. Wish me luck guys. Maybe this program will actually work.

There are two key things that prevent me from moving to IntelliJ:

  1. 20 years of using Eclipse, hey ho
  2. The Java Browsing perspective in Eclipse. In four clicks I can be at any method in my workspace, often without any scrolling.

Cas :slight_smile:

I was surprised that when I tried out IntelliJ this time around everything worked fine after importing the project including git, maven and the assets, I didn’t need to change a single setting.

I was a happy (at least I thought so) Eclipse user for the last 11 years, and switched to IntelliJ IDEA about 6 months ago because of work and now am using it personally as well. I really did use Eclipse thoroughly throughout the years and am now a very happy IntelliJ IDEA user and begin to hate Eclipse.
I would’ve never thought this to be possible since I hated using IntelliJ during the first weeks and always secretly fell back to Eclipse.
But it is all just habit, and every argument for Eclipse is a no-argument really. I was like “but in Eclipse I can navigate here and there so quickly” until I was shown how it works faster in IntelliJ.
It’s just that in the beginning you simply do not have a clue and simply making you think and read about how it would work and RTFM is an argument for the brain to say “no, stop! just use Eclipse. this is your comfort zone, this is what you know.”
It is habit and the natural urge to resist change. You just have to fight that.

If at all, there is just one single Eclipse feature I am missing in IntelliJ IDEA, which sadly is not really possible to configure sufficiently in IDEA, and this is Eclipse’s incredible incremental compiler and indexing capability, IMMEDIATELY giving you feedback about compile errors in ALL affected compilation units when you edit a single line of code somewhere. This is an invaluable tool when you do refactoring if you do not want to fallback to triggering the build system all the time just to let it tell you that you have compilation errors. With IntelliJ IDEA you instead have to open every compilation unit and only that triggers IDEA to notify any possible issues in that file.
This, I miss badly, also at work when doing large refactorings.
But on the other hand, IDEA shines when it comes to very advanced refactorings, so unless doing something by hand, IDE-initiated refactoring should not produce any errors if there weren’t errors before.

And IDEA’s inspections are a class of its own, supporting about every type of file you can dream of, not just Java compilation units - also JSPs, JSFs, property files, FreeMarker templates, and integrating everything very nicely - receiving a flag about a missing bean property in a FreeMarker template is really nice - of course this is plugin development but I feel that plugins for IDEA have a far better quality than those for Eclipse.

@KaiHH: You can use the eclipse compiler in intellij as well - not sure if the behaviour is exactly like it is in eclipse though.

All in all THANK you for your statement. Exactly this. Heard about this experience from friends and from myself dozens of Times.

Yes, I know. That’s why I said “is not really possible to configure sufficiently” :slight_smile:
The “project hierarchy view” (i.e. package explorer in Eclipse’s speak) does not catch up on the compilation results and does not flag compilation units erroneous until you manually open them in the editor.