How to add a jar to the download path in java 9

In my application that runs in java 8, I use -bootclasspath:p to add a jar to the download path. In java 9, the option is removed. What is the alternative to do the same in java 9?

+5
source share
1 answer

You can use -Xbootclasspath/a . Pay attention to the release notes , which say: -

In this release, the path to the load class has been removed. Java -Xbootclasspath and -Xbootclasspath/p have been removed.

The javac -bootclaspath can only be used when compiling in JDK 8 or higher. The system property sun.boot.class.path been removed.

Deployments based on overriding the platform classes for testing the target with -Xbootclasspath/p must be modified to use the --patch-module , which is described in JEP 261 .

The -Xbootclasspath/a not changed.

+5
source

Source: https://habr.com/ru/post/1274571/


All Articles