Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (808)
Games in Android Showcase (239)
games submitted by our members
Games in WIP (872)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  So like has anyone actually figured out how to deploy projects in Java9+ yet  (Read 2518 times)
0 Members and 1 Guest are viewing this topic.
Offline SkyAphid
« Posted 2019-05-17 23:40:36 »

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.

it just werks
Offline philfrei
« Reply #1 - Posted 2019-05-18 00:34:33 »

I am deploying ReferenceNoteKeyboard from 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.,,

When I export from Eclipse, I use the simple export jar option of just source code, and then work from, 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.

music and music apps:
Offline SkyAphid
« Reply #2 - Posted 2019-05-18 15:21:08 »

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.

it just werks
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline philfrei
« Reply #3 - Posted 2019-05-19 06:51:02 »

... even talented developers like yourself are having some issues.
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.

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.
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.

I'd love to see more posts like yours in the thread.
Agreed. But we may have to provide leadership here.

music and music apps:
Offline SkyAphid
« Reply #4 - Posted 2019-05-19 15:31:41 »

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.

it just werks
Offline philfrei
« Reply #5 - Posted 2019-05-19 18:34:08 »

What did you try? How did it break down?

music and music apps:
Offline SkyAphid
« Reply #6 - Posted 2019-05-20 06:58:11 »

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.

it just werks
Offline princec

« JGO Spiffy Duke »

Medals: 1146
Projects: 3
Exp: 20 years

Eh? Who? What? ... Me?

« Reply #7 - Posted 2019-05-20 09:20:53 »

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 Smiley

Offline VaTTeRGeR
« Reply #8 - Posted 2019-05-20 12:54:49 »

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.
Offline KaiHH

JGO Kernel

Medals: 819

« Reply #9 - Posted 2019-05-20 17:05:22 »

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.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline h.pernpeintner

JGO Ninja

Medals: 107

« Reply #10 - Posted 2019-05-20 18:44:13 »

@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.
Offline KaiHH

JGO Kernel

Medals: 819

« Reply #11 - Posted 2019-05-20 18:55:12 »

@KaiHH: You can use the eclipse compiler in intellij as well - not sure if the behaviour is exactly like it is in eclipse though.
Yes, I know. That's why I said "is not really possible to configure sufficiently" Smiley
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.
Pages: [1]
  ignore  |  Print  

Riven (846 views)
2019-09-04 15:33:17

hadezbladez (5789 views)
2018-11-16 13:46:03

hadezbladez (2602 views)
2018-11-16 13:41:33

hadezbladez (6205 views)
2018-11-16 13:35:35

hadezbladez (1498 views)
2018-11-16 13:32:03

EgonOlsen (4733 views)
2018-06-10 19:43:48

EgonOlsen (5791 views)
2018-06-10 19:43:44

EgonOlsen (3275 views)
2018-06-10 19:43:20

DesertCoockie (4174 views)
2018-05-13 18:23:11

nelsongames (5500 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!