package javax.jnlp is declared in module java.jnlp, which is not in the module graph

后端 未结 2 811
没有蜡笔的小新
没有蜡笔的小新 2021-01-11 22:34

I have a project that uses Java webstart technology. I decided to upgrade the Java version from 8 to 9. However, I faced the following error on compiling:

er         


        
相关标签:
2条回答
  • 2021-01-11 23:10

    It looks like java.jnlp is not resolved by default for code on the class path (much like Java EE modules). The solution is to add it explicitly with --add-modules java.jnlp (both javac and java accepts that parameter).

    This option is discussed in JEP 261: Module System or in this blog post.

    0 讨论(0)
  • 2021-01-11 23:18

    In IntelliJ IDEA: Add javaws.jar to Classpath(File -> Project Structure -> SDKs ->Class) C:\Program Files\Java\jdk-version\lib\javaws.jar

    0 讨论(0)
提交回复
热议问题