Thursday, July 11, 2019

Exceptions with ... not available
in the stacktrace may be caused by overriding the system property java.ext.dirs. Setting java.ext.dirs has been a popular but dangerous way for adding all jars within a directory to the classpath. Java 9 finally removed the feature ( Versions before Java 9 used the extension directories to find essential jars like sunjce_provider.jar, which contains a lot of algorithms required for SSL/TLS for example. So if you set java.ext.dirs, you may experience exceptions as described above. Solutions: a) include %JRE_HOME%/lib/ext respectively $JRE_HOME/lib/ext into the list of directories you set and hope that the environment variable JRE_HOME is set correctly or b) (much better) use -classpath instead. java and javac accept wildcards in -classpath. JNI does not so you have to write some code to make the expansion yourself.

No comments:

Post a Comment