Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternative for deprecated endorsed-standards override mechanism and extension mechanism

The release notes for Java 8 Update 40 (8u40) state:

The endorsed-standards override mechanism and the extension mechanism are deprecated and may be removed in a future release. There are no runtime changes. Existing applications using the 'endorsed-standards override' or 'extension' mechanisms are recommended to migrate away from using these mechanisms.

There is also the issue which clarifies that with Jigsaw (planned for Java SE 9, AFAIK) this will be replaced with a modular approach somehow:

http://bugs.java.com/view_bug.do?bug_id=8065675

I understand that Oracle wants to deprecate these mechanisms now because they cannot support them in Java SE 9 anymore.

On the other hand, it's not a good practice to deprecate something without providing an alternative.

The release notes state: "Existing applications [...] are recommended to migrate away from using these mechanisms"

So how can you "migrate away from"

  • endorsed-standards override mechanism
  • extension mechanism

in Java SE 8?

like image 878
Puce Avatar asked Mar 11 '15 10:03

Puce


People also ask

What is Djava endorsed?

The system property java. 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.


1 Answers

I found the following article, which explains that these mechanisms are indeed planned to be removed in Java SE 9:

https://blogs.oracle.com/java-platform-group/entry/planning_safe_removal_of_under

Unfortunately there doesn't seem much you can do now, e.g. for libraries which are part of the JRE.

What to do if you are affected

Although most applications do not use the endorsed standards or extension mechanism, some applications do. If you are a developer, please consider providing dependencies as part of your application rather than requiring external system configurations. If you are not the developer, please contact the individual software vendor for support.

like image 184
Puce Avatar answered Oct 26 '22 21:10

Puce