I have been trying to run minecraft under 64-bit JRockIt, hoping to get better performance (Will I? It works very well for server applications.)

I use the command:

"C:\Program Files\Java\jre6\bin\java" -Xms512m -Xmx4096m -cp "%APPDATA%\.minecraft\bin\*" -Djava.library.path="%APPDATA%\.minecraft\bin\natives" net.minecraft.client.Minecraft

However JRockit probably considers the "." in the any name as a package delimiter

C:\Users\Midhat\Desktop>java -Xms512m -Xmx4096m -cp "C:\Users\Midhat\AppData\Roa
ming\.minecraft\bin\*" -Djava.library.path="C:\Users\Midhat\AppData\Roaming\.min
ecraft\bin\natives" net.minecraft.client.Minecraft 
Exception in thread "Main Thread" java.lang.NoClassDefFoundError: C:\Users\Midha
Caused by: java.lang.ClassNotFoundException: C:\Users\Midhat\AppData\Roaming\.mi
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: C:\Users\Midhat\AppData\Roaming\.minecraft\bin\lw
jgl.jar.  Program will exit.

Is there any way I can use JRockIt to run Minecraft? Could this be a JRockIt bug?

  • 1
    Sounds like a JRockit bug in that they're not parsing the name properly.
    – ChrisF
    Jan 17 '12 at 15:21
  • 1
    Try listing the jar files manually instead of using "*". It sure looks like something tries to enumerate all files in the bin directory and the java.exe gets confused by this. Jan 17 '12 at 19:20

If this were Unix, then this part would be wrong; I'm not sure whether the same applies to Windows. But it seems likely, since the error is a pathname where it expects a class name.

-cp "C:\Users\Midhat\AppData\Roaming\.minecraft\bin\*"

This is w wrong because the * expands to multiple arguments, whereas -cp takes only one argument after it (it expects a series of pathnames separated by semicolons on Windows).

To handle this, you need to explicitly give the paths to the jars (replace the ... with the rest of the pathname you had; I'm just condensing the example) as a single argument.

-cp "C:\...\jinput.jar;C:\...\lwjgl_util.jar;C:\...\lwjgl.jar;C:\...\minecraft.jar"

Try not specifying the classname - "net.minecraft.client.Minecraft"; you may not necessarily need to specify the classname. OpenJDK seems to get on fine without it.

  • didnt work. Without specifying the class, even the Oracle JVM doesnt work for me.
    – Midhat
    Jan 17 '12 at 16:04
  • (and calling it "Oracle" JVM hurts So much)
    – Midhat
    Jan 17 '12 at 16:05
  • Well, OpenJDK is the Free Software fork of Oracle Java, even has the Oracle copyright notices. I'm on Linux, so maybe it's taking an educated guess as to what the launcher needs to launch? I have no idea beyond that.
    – Broam
    Jan 17 '12 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.