To clarify @Peter Lawrey's answer ...
The beginning of stacktrace:
Exception in thread "main" java.lang.UnsatisfiedLinkError: java.util.zip.ZipFile .open(Ljava/lang/String;IJ)J at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:114) ...
UnsatisfiedLinkError is raised when you try to call the native method, which was not allowed by the method in the corresponding native library. The rest of the message tells us that the method has a signature on error:
long java.util.zip.ZipFile.open(String, int, long)
and this is the grid with the top stack trace frame ... and the fact that Java ZipFile code is known to use the native library for heavy lifting.
The fact that he got this far means that the JVM found the native library and loaded it. But, apparently, the load did not allow this overload of the native open method. This can only mean one thing: the version of the ZipFile class in the bootclasspath does not match the source library.
We cannot draw any definite conclusions about whether it is a JDK or a JRE, but it seems likely that it is a JDK ... unless the OP tries to invoke the Java compiler in a weird way. ("Could not find the main class: message com.sun.tools.javac.Main" probably means that the JVM was unable to load the class ... due to an UnsatisfiedLinkError break.)
In any case, the JDK vs. JRE is not an immediate problem. The real problem is the mismatch between the "rt.jar" in the bootclasspath JVM and the built-in libraries.
The question asks:
how to solve it?
It depends on what exactly you did to get this error.
- Which team did you execute?
- What were the command line options and arguments?
- Did you really mess around with your JRE / JDK installation?
- Are you trying to use the "rt.jar" file from one installation to another?
source share