4

I have an application build with install4j and it uses openjdk-8. Now i want to change openjdk-8 to openjdk-11. My application only uses jre not full jdk. In jdk11 there is no separate jre.

But AdoptOpenJDK is providing jre separately for jdk-11 but there are some jar files are missing and therse is no lib\ext folder in jre.

Missing jar files

Missing jar files

My question is can i add these jar files manually in jre that i downloaded from AdoptOPenJDK?

deadshot
  • 8,881
  • 4
  • 20
  • 39
  • Java is using modules since Java 9. Only a few exceptions are delivered as jar for interoperability. But this seems to be an [xy problem](https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem/66378#66378). It doesn’t matter whether there are jar files in a folder named ext. The purpose of a JRE is to execute Java software. Do you have an actual problem executing Java software with this JRE? – Holger Apr 22 '20 at 11:07
  • 2
    Normally, an application is using the classes provided by the JRE and not messing around with the jars. When the application is needed a particular missing API, you have to name it, as there is a wide range of possibilities. There are APIs not included in the JRE, APIs which have been removed, APIs which are now maintained by 3rd parties, and so on… – Holger Apr 22 '20 at 12:31
  • @deadshot, did you find a simple solution for this problem? I have a single jar I'd like to have be part of JDK 11, not sure the easiest way to get it included (which I realize the easiest may not be the best). – Doug Apr 19 '21 at 15:13

1 Answers1

2

According to the Oracle JDK Migration Guide for JDK 11, the lib/ext directory was removed starting in JDK 9, and the presence of this directory will force java or javac executables to exit. For details see topic Removed Extension Mechanism in JDK 9 on Page 15 of this Migration Guide.

As for JavaFX, JDK 11 no longer includes it. You can obtain JavaFX and include it in your installation as either modular (jmod) or non-modular (jar) files. For details see the Getting Started with JavaFX reference documentation, specifically the sub-topics under Runtime Images.

Both of these guides offer a lot of guidance for migrating to JDK 11 or newer (Oracle offers newer editions of their migration guide, up to JDK 15).

MikeOnline
  • 994
  • 11
  • 18