Advance thanks, who are be going to help me.
Story: till date my application is using JDK8
, but right now I am migrating my application to Open JDK11
and using IVY
as dependency manager and Ant
as a build tool.
Problem: I was facing compile-time issues in eclipse for javax
, but then I change JRE
lib in the build path, from classpath
to Modulepath
. Now everything is working fine. But now the main problem is, while running antbuild.xml
using Ant
, this still giving me the same compile-time errors. I think I know what to do now, but how to do I don't know. I have to add Open JDK11
as module path somewhere in antbuild.xml
.
Main Question: How to set Open JDK11
as module path in antbuild.xml
(BASICALLY ANT BUILD FILE).
if the question is still not understandable, please let me know.
The class files created by Java 8 are still executable in Java 11; however, there have been other changes in the Java runtime (library changes, etc.) that might require modification of the code. These modifications may be made in Java 8 and compiled with Java 8 making it compatible with the Java 11 runtime.
I know you can install both. Java 8 and Java 11 and keep them at the same time...
After 11 months I am able to post the answer because I understand the actual problem and now I have a solution that I implement in my project and its working flawlessly, all the compile-time errors are fixed.
What solution I implement.
properties
> Java build path
classpath
remove Java 8
and above it, you will find Modulepath
Modulepath
then Add Library
from right button paneJRE System Library
press Next Buttonjava
Standard VM
> press Next button.JRE Home
from your filesystem make sure you select path up to bin, not bin Reason for this problem
See Java changes its file structure, so a lot of packages moved here and there. Some new packages are used, some got replaced and renamed.
So the basic problem is just this.
Solution That We can implement to resolve compile-time errors
Ctrl
+ shift
+ t
, paste file name and see which possible options now we have, actually now we have more than one lib which is providing the same class implementation. so now we have to choose one and remove another dependency from the dependency manager.This solution helped me. If you are facing the same issue, please connected me, I might help you with this.
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