In respect to the maven-compiler-plugin. There is a setting added to my project's POM file. The configuration is given below.
<plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> <compilerArguments> <endorseddirs>${endorsed.dir}</endorseddirs> </compilerArguments> </configuration> </plugin> </plugins>
What does it mean to have a <endorseddirs>
in the compiler arguments? How does it works with java compiler?
endorsed. dirs specifies one or more directories that the Java runtime environment will search for such JAR files. If more than one directory path is specified by java.
In Windows, open the QIE Service Manager, and click the Startup tab. In the Arguments section remove the highlighted line below (which contains the -Djava. endorsed. dirs), then click Apply.
From the documentation of Endorsed Standards Override Mechanism, it is a mechanism to provide newer versions of an endorsed standard than those included in the Java 2 Platform
Your project must be creating and/or using such an implementation.
By specifying <endorseddirs>
attribute, you are instructing the java compiler to look at jars present in this folder to override similarly defined classes in the standard jdk.
By Java documentation, java.endorsed.dirs
is used to provide an Endorsed Standards Override Mechanism. Which means, a user can provide newer versions of certain packages than those provided by the JDK. If there are newer implementations of these packages in the directories specified by java.endorsed.dirs, those implementations will be loaded instead of the default ones that come with the JDK.
The packages that can be overriden this way are grouped into Endorsed Standards APIs and Standalone Technologies, and are listed in the Java documentation.
Roughly speaking the Endorsed Standards APIs include:
Standalone Technologies include:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With