Results 1 to 2 of 2

Thread: Natty Java/Minecraft Server problems

  1. #1
    Join Date
    Apr 2010
    Beans
    6

    Natty Java/Minecraft Server problems

    Hi guys,
    I'm trying to run a minecraft server on my 64-bit, 11.04 Natty Narwhal machine, but the server *.jar is returning some odd errors which I did not run into previously.
    I've tried both of the OpenJDK and Sun Java runtime environments, and received the same error both times.
    I execute the following command in my server directory after chmod'ing the executable:
    sudo java ./minecraft-server.jar
    ...and receive the following output:
    Exception in thread "main" java.lang.NoClassDefFoundError: //minecraft-server/jar
    Caused by: java.lang.ClassNotFoundException: ..minecraft-server.jar
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 21)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 66)
    Could not find the main class: ./minecraft-server.jar. Program will exit.
    I'm not sure what all of this means; I'm not too familiar with Java. I have another machine running 10.10 which runs this just fine...however, that computer is also 32-bit, so I'm not sure which poses this problem.

  2. #2
    Join Date
    Aug 2011
    Beans
    20

    Re: Natty Java/Minecraft Server problems

    As long as you have enabled running the file as an executable then just execute it like so:

    Code:
    ./minecraft-server.jar
    If you plan on running it using the java command, you need to specify the memory parameters, like so:

    Code:
    java -Xms1023M -Xmx1024M -jar minecraft-server.jar

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •