I am trying to upgrade my java application from Java 7 to Java 11 version. My local is setup with jdk11 and Java_Home is updated as well. Running the app in Intellij 2023.1 IDE which is the latest version.
When running the local application which is pointing to Jdk11 facing Error: 'Exception in thread "main" java.lang.NoClassDefFoundError: javax/annotation/PreDestroy'. Changes made to my local are the jdk previously was pointing to java 8, now it is pointing to java 11.
I have read previous posts on the same error and everyone suggested for a downgrade of the jdk from 11 to 8. But in my case I have to upgrade the application to Java 11 and the the project is on Ant build.
Any help is appreciated. Please let me know if any additional information is required.
I have tried upgrading the libraries and still the same issue is persist.