Open SonicFan2020-best opened 2 years ago
The resources need to be in the class path. This includes for example the bios image.
The resources need to be in the class path. This includes for example the bios image.
wait you think i builded the emulator.
oh i should try that
alright lets try it
well didnt work :(
Nice. Even more errors.
It seems like current build of JPC is not working on JDK11 or later, if I run it with JDK1.8 it's running fine.
The problem is that Java 9 changed the class loader to no longer be a URLClassLoader A custom ClassLoader may need to be written to get it working on the current Java https://stackoverflow.com/questions/46694600/java-9-compatability-issue-with-classloader-getsystemclassloader
Edit: A Solution is pretty simple. Around like 523 to 525 should be replaced to the code below or whatever is more kosher
/*if (!(cl instanceof URLClassLoader)) {
throw new IllegalStateException();
}*/
URL[] urls = new URL[0];
try {
urls = Collections.list(cl.getResources("")).toArray(urls);
} catch (IOException ex) {
Logger.getLogger(JPCApplication.class.getName()).log(Level.SEVERE, null, ex);
}
I'm trying to make a program that uses your emulator to emulate Windows 95.
But on Ubuntu 20.04 Focal Fossa, I get this error message:
Exception in thread "main" java.lang.IllegalStateException at org.jpc.j2se.JPCApplication.getResources(JPCApplication.java:593) at org.jpc.j2se.JPCApplication.<init>(JPCApplication.java:205) at org.jpc.j2se.JPCApplication.main(JPCApplication.java:766)
How do I fix this?