You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to run the org.fife.rsta.ac.demo.DemoApp class in AdoptOpenJDK 11.0.9.101, but a null pointer exception is thrown. I debugged the code and found the problem.
In the org.fife.rsta.ac.java.buildpath.LibraryInfo class, the getJreJarInfo() method looks for the rt.jar file, but in Java 11 and later this file has been changed to jrt-fs.jar.
I fixed this problem locally for Windows 10, but I don't know the behavior of this change on other OS:
publicstaticLibraryInfogetJreJarInfo(FilejreHome) {
LibraryInfoinfo = null;
FilemainJar = newFile(jreHome, "lib/rt.jar"); // Sun JRE'sFilesourceZip;
if (mainJar.isFile()) { // Sun JRE'ssourceZip = newFile(jreHome, "src.zip");
if (!sourceZip.isFile()) {
// Might be a JRE inside a JDKsourceZip = newFile(jreHome, "../src.zip");
}
} else { // Might be OS XmainJar = newFile(jreHome, "../Classes/classes.jar");
// ${java.home}/src.jar is the common location on OS X.sourceZip = newFile(jreHome, "src.jar");
}
//////////////////////////////////////////////////if (!mainJar.isFile()) { // Java 11 and latermainJar = newFile(jreHome, "lib/jrt-fs.jar");
sourceZip = newFile(jreHome, "src.zip");
}
//////////////////////////////////////////////////if (mainJar.isFile()) {
info = newJarLibraryInfo(mainJar);
if (sourceZip.isFile()) { // Make sure our last guess actually existsinfo.setSourceLocation(newZipSourceLocation(sourceZip));
}
} else {
System.err.println("[ERROR]: Cannot locate JRE jar in " + jreHome.getAbsolutePath());
mainJar = null;
}
returninfo;
}
The text was updated successfully, but these errors were encountered:
I tried to run the
org.fife.rsta.ac.demo.DemoApp
class in AdoptOpenJDK 11.0.9.101, but a null pointer exception is thrown. I debugged the code and found the problem.In the
org.fife.rsta.ac.java.buildpath.LibraryInfo
class, thegetJreJarInfo()
method looks for thert.jar
file, but in Java 11 and later this file has been changed tojrt-fs.jar
.I fixed this problem locally for Windows 10, but I don't know the behavior of this change on other OS:
The text was updated successfully, but these errors were encountered: