DEV Community 👩‍💻👨‍💻

Cover image for Making applications created with old Java versions work on Java 9 and later versions
Roberto Gentili for Burningwave

Posted on • Updated on

Making applications created with old Java versions work on Java 9 and later versions

With Burningwave Tools it is possible to perform dependencies shrinking and also to make applications created with old java versions work on java 9 and later versions. To adapt applications to java 9 and later you must create an application adapater and run it with a jdk 9 or later. In this application adapter you must load, by using PathHelper, the jdk libraries by which the target application was developed and pass to the method captureAndStore of TwoPassCapturer component, as first parameter, the name of the class of your application that contains the main method. In the example below we adapt a Java 8 Spring Boot application to Java 9 or later.

After prepared the dependencies adapter you need to run it: at the end of the execution you will find in the destination folder a system executable (a .cmd file under windows and a .sh file under unix) with which it will be possible to test the extracted dependencies:

extracted dependencies folder

We learned how to adapt a Java application to Java 9 and later versions and you can download/clone the tutorial shared here on GitHub: to make it works you need:

For further assistance you can write a comment below or you can subscribe to the forum and then ask in the topic "How to do?" or you can ask on Stack Overflow.

Special thanks to Jim Jerald Burton for maintaining the source code of this tutorial.

Top comments (0)

DEV runs on 100% open source code known as Forem.

Contribute to the codebase or host your own.
Check these out! 👇