gradlejava-9gluonversion-compatibility

How to set up Gluon for JDK 9?


I recently upgraded to JDK 9 however Netbeans did not support that yet - so I downloaded Eclipse Oxygen. But I got into the problem Eclipse gluon new project does not finish

And using the latest Gradle Buildship plug in with the Gluon 2.5 - did not work for me (still having problem with finish button). I tried downgrading the Gradle Buildship to 2.1.2 and that allowed me to press the finnish button. However then gradle could not create gluon project - "gradle could not determine java version from '9.0.1'"

I downloaded IntelliJ IDEA and it did not work there either. I can also be mention I could run JDK 9 java projects in both Eclipse and Intellij as expected. In IntelliJ I found my jdk path not set. Setting it did not help. Then when I changed from using wrapper to local gradle, version 4.3.1 I could create a gradle project in Intellij - without getting the "gradle could not determine java version from '9.0.1'". That also allowed me to create a gluon project in intellij however...

"process 'command '/Library/Java/JavaVirtualMachine/jdk-9.0.1.jdk/Contents/Home/bin/java'' finished with non-zero exit value" ... After trying to move jdk as I had two library folders, one in Mac ssd and one in home directory - of which did not work I tried with Eclipse again

There I went preferences and set gradle to local gradle to that same 4.3.1 version as I did in INtellij. Now the gluon project could be created. But when I run the run gradle task I then get same error as in Intellij "process 'command '/Library/Java/JavaVirtualMachine/jdk-9.0.1.jdk/Contents/Home/bin/java'' finished with non-zero exit value"

Do I need to tell Gradle where to look for jdk or what is going on? And since: https://discuss.gradle.org/t/could-not-determine-java-version-from-9-0-1/24457 I already have Gradle updated I have no other choice but to ask for help.

This was done on a most recent updated mac - I have not tried yet on windows


Solution

  • The Gluon VM Developer Preview has just been released.

    This means that you have a new jfxmobile plugin version: 2.0.0, which allows running Java 9 on desktop and mobile.

    The Gluon IDE plugin has been updated (check your IDE for the latest version), and there is a new template available: Single View Project on Gluon VM.

    This template will generate a project with the required build.gradle file. Note that you can apply the configuration of this build file to the other templates or to existing projects.

    You can also check the Gluon VM sample in GitHub. If you download it, you can:

    (*) Android supports Java 8 API since version 24. It doesn't support Java 9 new API yet.

    Note that the jfxmobile plugin version 1.3.10 from the other templates is still valid if you want to run/deploy projects with Java 7/8 as usual.