Help With OpenJDK and Minecraft?..... :3 Part II, Revenge of the Error..... :3

blackneos940

Active Member
Joined
May 16, 2017
Messages
347
Reaction score
207
Credits
332
So I can confirm that this issue is oddly mostly specific, both to the X205TA, and in particular, Lubuntu, and not on Windows 8 or 10, which were previously on this Device..... :) Basically, I'm having trouble loading (but not installing) both Optifine 1.12, AND Forge 1.12 Clients on Minecraft..... :3 I have a feeling I know a guy who might be able to help me with this..... ;) Anywho, here's the error, and I'm running this via a Terminal Emulator, if it helps any:

Code:
Exception in thread "main" java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
    at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

Any ideas guys.....? :3 I'm currently buzzed on Caffeine, and I'm currently using OpenJDK 10, with the Certs configured properly..... :) Basically, everything works BUT Forge and Optifine, and from my past experience running both, NOTHING should go wrong..... :\ I'm reasonably well-versed enough in Java to get somewhat of an idea as to what may be going wrong, but..... :) Thank you SO much for any help guys, and.....

May The Code Be With You :D
 


From a quick bit of duckduckgo-fu, I found someone with a similar problem:
https://stackoverflow.com/questions/39739075/hive-shell-not-loading#41637409

It's a different program, but they are experiencing exactly the same error message. The OP in the thread is attempting to run a java based program in OpenJDK9 and is getting the same error as you.

From a quick look at the document linked by the only responder to that post (see pages 32 and 33), it appears to be some kind of backwards incompatible changes that were introduced into openJDK9, which affects the main application loader class. But I don't fully understand the document, so I'm not entirely sure if this is a bug, or a deliberate "feature"... :/

It's also mentioned in JEP261, which is one of the JDK Enhancement Proposals.

From what I can see, it looks like the only fix/workaround is to install and use OpenJDK8 for Minecraft (and forge/optifine).

I believe it's possible to have multiple versions of the JDK/runtime installed, but offhand - I don't know how you'd go about specifying which JDK/runtime to use for a particular application.
It's not something I've ever had to deal with before. I'll try to look into that for you when I get a chance.

Also: AFAIK Minecraft is built using the official Sun/Oracle Java SDK. I also believe that they recommend using the Oracle JDK/runtime to run it too.
So an alternative fix might be to download and install the official Oracle JDK/runtime.

Outside of that, the only other fix would be to update the source code for the original programs to take these changes to the Java language into account - But that's blatantly not feasible, unless you're secretly Notch, or working for Microsoft!

So I think your best bet would be to either:
1. Install OpenJDK8 and run Minecraft et-al against that
OR
2. Install the official Oracle JDK/runtime and use that instead.
 
From a quick bit of duckduckgo-fu, I found someone with a similar problem:
https://stackoverflow.com/questions/39739075/hive-shell-not-loading#41637409

It's a different program, but they are experiencing exactly the same error message. The OP in the thread is attempting to run a java based program in OpenJDK9 and is getting the same error as you.

From a quick look at the document linked by the only responder to that post (see pages 32 and 33), it appears to be some kind of backwards incompatible changes that were introduced into openJDK9, which affects the main application loader class. But I don't fully understand the document, so I'm not entirely sure if this is a bug, or a deliberate "feature"... :/

It's also mentioned in JEP261, which is one of the JDK Enhancement Proposals.

From what I can see, it looks like the only fix/workaround is to install and use OpenJDK8 for Minecraft (and forge/optifine).

I believe it's possible to have multiple versions of the JDK/runtime installed, but offhand - I don't know how you'd go about specifying which JDK/runtime to use for a particular application.
It's not something I've ever had to deal with before. I'll try to look into that for you when I get a chance.

Also: AFAIK Minecraft is built using the official Sun/Oracle Java SDK. I also believe that they recommend using the Oracle JDK/runtime to run it too.
So an alternative fix might be to download and install the official Oracle JDK/runtime.

Outside of that, the only other fix would be to update the source code for the original programs to take these changes to the Java language into account - But that's blatantly not feasible, unless you're secretly Notch, or working for Microsoft!

So I think your best bet would be to either:
1. Install OpenJDK8 and run Minecraft et-al against that
OR
2. Install the official Oracle JDK/runtime and use that instead.
Thank you for your help, good sir *bows*..... :3 I'll give it a whirl, and see what comes of it!..... ^^
 
From a quick bit of duckduckgo-fu, I found someone with a similar problem:
https://stackoverflow.com/questions/39739075/hive-shell-not-loading#41637409

It's a different program, but they are experiencing exactly the same error message. The OP in the thread is attempting to run a java based program in OpenJDK9 and is getting the same error as you.

From a quick look at the document linked by the only responder to that post (see pages 32 and 33), it appears to be some kind of backwards incompatible changes that were introduced into openJDK9, which affects the main application loader class. But I don't fully understand the document, so I'm not entirely sure if this is a bug, or a deliberate "feature"... :/

It's also mentioned in JEP261, which is one of the JDK Enhancement Proposals.

From what I can see, it looks like the only fix/workaround is to install and use OpenJDK8 for Minecraft (and forge/optifine).

I believe it's possible to have multiple versions of the JDK/runtime installed, but offhand - I don't know how you'd go about specifying which JDK/runtime to use for a particular application.
It's not something I've ever had to deal with before. I'll try to look into that for you when I get a chance.

Also: AFAIK Minecraft is built using the official Sun/Oracle Java SDK. I also believe that they recommend using the Oracle JDK/runtime to run it too.
So an alternative fix might be to download and install the official Oracle JDK/runtime.

Outside of that, the only other fix would be to update the source code for the original programs to take these changes to the Java language into account - But that's blatantly not feasible, unless you're secretly Notch, or working for Microsoft!

So I think your best bet would be to either:
1. Install OpenJDK8 and run Minecraft et-al against that
OR
2. Install the official Oracle JDK/runtime and use that instead.
Hey, it works!..... :3 But specifically, I installed Oracle Java 8..... :3 Thanks for the help!..... ^^
 

Staff online


Top