Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (791)
Games in Android Showcase (234)
games submitted by our members
Games in WIP (864)
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  
  Eclipse and OpenJDK 12  (Read 5921 times)
0 Members and 1 Guest are viewing this topic.
Offline philfrei
« Posted 2019-04-28 06:41:53 »

It seems the latest Eclipse and OpenJDK 12 don't work together very well. Am going to have to back track to OpenJDK 11. (I know I had 10 working with an Eclipse from August.)

music and music apps: http://adonax.com
Offline VaTTeRGeR
« Reply #1 - Posted 2019-04-28 13:01:47 »

I use eclipse 4.10 (4.11 is the first supported version for JDK12?) and it gives me funny error messages like Object doesn't exist no matter what i do regarding module-info.java etc.

Have you installed this patch already? https://marketplace.eclipse.org/content/java-12-support-eclipse-2019-03-411

Which problems are you having and what version of eclipse do you use? You didn't give lots of information on that.
Offline princec

« JGO Spiffy Duke »


Medals: 1085
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #2 - Posted 2019-04-28 16:36:25 »

I gave up on JDK12 because Eclipse is rather broken.

Actually Eclipse doesn't even seem to handle Java 9 all that well either. The module system stuff is just... borked in some way. I can't quite put my finger on it but the IDE seems to actively try to break things for you. I think they need to throw their module stuff away and rethink it.

Cas Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #3 - Posted 2019-04-28 18:33:03 »

I use Eclipse IDE 2018‑12 with OpenJDK 11 under GNU Linux (Mageia Linux) and it works correctly. I have used a very little bit the module system, it seems to work but I need to use a lot more to confirm or not whether it's really stable. The rest goes on working. You absolutely need Eclipse IDE 2019-03 with OpenJDK 12.

Julien Gouesse | Personal blog | Website | Jogamp
Offline philfrei
« Reply #4 - Posted 2019-04-29 01:11:20 »

I use eclipse 4.10 (4.11 is the first supported version for JDK12?) and it gives me funny error messages like Object doesn't exist no matter what i do regarding module-info.java etc.

Have you installed this patch already? https://marketplace.eclipse.org/content/java-12-support-eclipse-2019-03-411

Which problems are you having and what version of eclipse do you use? You didn't give lots of information on that.

The Eclipse I have that works with OpenJDK 11 is 2018-12 (4.10.0), running on my laptop.
On my desktop Neon version, I was also getting the Object does not exist messages, after upgrading from Java 10, jumping to 12.

I downloaded Eclipse 2019-03 (4.11.) but for me, it is not working well with OpenJDK 12. I'm getting an odd error message: "The project was not built due to 'release 6 is not found in the system'. Fix the problem, then try refreshing this project and building it since it may be inconsistent"

When I get a chance (might not be until next week), I'm going to back track to OpenJDK 11. [EDIT: Given that 11 is LTS, maybe the sensible thing is to just leave it there until 17 or whatever the next LTS is.]

I'll check out the link to the support patch for 12 at that time, first. Thanks for that!

I'm not counting on the modular stuff working all that well since it is both new and considerably different, and Eclipse depends on volunteers. That's a big reason why I decided to figure out how to do the modular compiling and jlinking on the command line. I'm reconciled to that, for now. It is not a big burden.

music and music apps: http://adonax.com
Offline VaTTeRGeR
« Reply #5 - Posted 2019-04-29 09:03:39 »

I updated my Eclipse installation by enabling "Preferences->Install/Update->Available Software Sites->Latest Eclipse Release" and then running "Help->Check for updates". The project builds now Tongue Maybe that included a hotfix for 4.11 and JDK12.
Offline nsigma
« Reply #6 - Posted 2019-05-05 08:51:21 »

I downloaded Eclipse 2019-03 (4.11.) but for me, it is not working well with OpenJDK 12. I'm getting an odd error message: "The project was not built due to 'release 6 is not found in the system'.

Possibly not that odd a message. I presume the project is set to use Java 6 source level?  Java 12 drops support for compiling Java 6.  https://openjdk.java.net/jeps/182

When I get a chance (might not be until next week), I'm going to back track to OpenJDK 11. [EDIT: Given that 11 is LTS, maybe the sensible thing is to just leave it there until 17 or whatever the next LTS is.]

Depends where you got OpenJDK 11 from - Oracle's OpenJDK 11 isn't an LTS.

Praxis LIVE - hybrid visual IDE for (live) creative coding
Offline philfrei
« Reply #7 - Posted 2019-05-05 21:25:36 »

I downloaded jdk 12.0.1 GA Release from http://jdk.java.net/12/

All the projects were set to Java 10 prior to this, in Eclipse. I left 6 behind long ago.

I wonder which article I read that said 11 was an LTS.

I can see where OpenJDK from Oracle says they don't recommend using 11 or prior in production due to security concerns. I have to wonder if it affects my little applications if I'm only using a couple modules and am not reading input from external sources.

I wonder how the Eclipse organization is going to be able to keep up with the pace!

music and music apps: http://adonax.com
Offline nsigma
« Reply #8 - Posted 2019-05-05 22:04:06 »

I wonder which article I read that said 11 was an LTS.

Because in general 11 is an LTS. But the only LTS from Oracle is the paid-for JDK. Their OpenJDK isn't! For a free 11 LTS you'll have to get it from a different vendor. There are a few, but I would recommend AdoptOpenJDK.

If you want the full "fun" read on all this try https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244

Praxis LIVE - hybrid visual IDE for (live) creative coding
Offline philfrei
« Reply #9 - Posted 2019-05-20 07:54:46 »

Eclipse 2019-03 (4.11.0) is now working for me with OpenJDK 12.0.1 & OpenJFX 11.2.
I obtained OpenJFX from openjfx.io, and the link provided in their documentation https://gluonhq.com/products/javafx/
Note that you have to download both an SDK and a jmods! Two downloads for OpenJFX.

I used the choice File/import/Existing Projects into Workspace, and had the projects copied into the new Workspace. Once this is done, I think we have to do the following to get the projects to work.

1) Set the Java Compiler to Compiler compliance level 11 (the highest offered).

2) On the Java Build Path, add a Library to the Modulepath (Classpath also seems to work but I'm not clear on whether one or the other is more correct). At the "Add Library" screen I selected "User Library", and gave the New library the name "JavaFX11" (you can name it whatever you want). Then, with the library selected I clicked "Add External JARs" and navigated to the /lib folder of the installed JavaFX SDK. From there I selected all the .jar files, and these became the contents of the JavaFX11 library. This only had to be done once.

3) Again from the Java Build Path, I went to Add Library and selected the new JavaFX11 User library. (This choice, with check box, should now always be present when you navigate to add a User Library.)

At this point all the weird errors had disappeared.  Tongue

However, to run the program, the Run Configuration has to be edited to include the following Argument (second tab):

VM arguments:
1  
--module-path "c:\Program Files\Java\javafx-jmods-11.0.2" --add-modules=javafx.controls


Your command may differ if you have downloaded to a different location, or downloaded a different set of modules from Gluon. Note, this is the address of the jmods, not the SDK!

Also, if your program uses more than the basics of JavaFX, you might have to add additional modules (comma-separated) to the --add-modules command.

OK then.
By the way, I'm not making the code for my projects modular at this point. Instead I'm leaving them with no module-info file, which is also known as the "Unnamed Module".

I haven't tried to make a jar yet. I assume that I will build a self-contained folder instead for demos and distribution. To do this, I export source and do command line compilation and jlinking.

The last stages for packaging involve either adding a simple .BAT (Windows) or Bash command (MacOS) for distribution to computer-savvy folks, or I will use Inno-Setup 6 (Windows) or make a manual .app (for MacOS process described in another tutorial) for commercial distribution.

It is a workable solution and workflow for my small-scale projects. It may not be the best solution, but I'm happy to once again have a working dev environment and to go back to coding instead of effing around with this configuration crapola. If I've spared anyone else some of the misery I've gone through figuring this out, I will sleep better at night knowing I've done something useful.

music and music apps: http://adonax.com
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

« JGO Spiffy Duke »


Medals: 1085
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #10 - Posted 2019-05-20 09:22:30 »

Thanks for losing hair on our behalf Phil. I'm going to wait until it's all rather more matured I think though. Too many things lurk waiting to jump out and disrupt my sleep.

Cas Smiley

Pages: [1]
  ignore  |  Print  
 
 

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

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

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

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

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

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

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

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

nelsongames (3478 views)
2018-04-24 18:15:36

nelsongames (4490 views)
2018-04-24 18:14:32
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

Deployment and Packaging
by gouessej
2018-08-22 08:03:45
java-gaming.org 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‑gaming.org
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!