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

I have a project that uses Java webstart technology. I decided to upgrade the Java version from 8 to 9. However, I had to execute the following compilation error:

error: package javax.jnlp is not visible
import javax.jnlp.DownloadServiceListener;
        ^
(package javax.jnlp is declared in module java.jnlp, which is not in the module graph)

I tried to include C:\Program Files\Java\jdk-9\lib\javaws.jarin the classpath, but the same problem still remains.

+6
source share
2 answers

It seems that java.jnlp is not allowed by default for code on the class path (like Java EE modules ). The solution is to add it explicitly with --add-modules java.jnlp(both javacand javaoverride this setting).

+6
source

IntelliJ IDEA: javaws.jar Classpath ( → → SDKs → ) C:\Program Files\Java\jdk- \lib\javaws.jar

0

All Articles