How to work with JDK 9?

Answered

Hello, 

I am attempting to start a new JDK 9 project (JavaFX or Plain Java) with Intelij 2016.2.  The project seems to be created OK but when I attempt to run it I get a message telling me the flag -release is invalid.

I am unsure what else to try?  I can'f find anything on running with the JDK 9 and Jigsaw.  

This is a fresh install of InteliJ and a brand new project.

 

Thanks!

8 comments
Comment actions Permalink

Thanks for the tip - how do I set that to experimental?  I can't find the setting.

 

0
Comment actions Permalink

You can change it here: http://i.imgur.com/2ShcJOg.png. Note that each module may override this setting, so also check here: http://i.imgur.com/6MaDGQE.png.

1
Comment actions Permalink

That worked - thanks!

0
Comment actions Permalink

I don't have the experimental setting in my IDE.  What is the workaround?

0
Comment actions Permalink

What error do you get? Did you try Java 9 language level?

0
Comment actions Permalink

I was on 2016.3.5.  After upgrading to 2016.3.7: I did see the experimental setting.  I was getting the "Invalid flag: -release" error.  I had to go to every module and change the language level to experimental.  Is there a way to change this in one place and have it take effect for all modules?

0
Comment actions Permalink

No, this has to be changed per module.

0

Please sign in to leave a comment.