|
Oct 06
|
This tutorial will help you setup your own minecraft server in linux.
1. You need to install Java 1.6 , this will give you all the packages you need:
yum install java-1.6*
2. Download latest minecraft server and unzip it into its own directory. I used \home\mindcraft
wget http://www.minecraft.net/minecraft-server.zip
unzip minecraft-server.zip
2. To Launch the server use this command.
java -cp minecraft-server.jar com.mojang.minecraft.server.MinecraftServer
3. The first time you launch it, the server will create a few files after a few seconds ctrl-c to stop.
4. Now that you have the config files created, put your username in both the admins.txt and the players.txt files. Edit the server.properties and set the port number and change public =true
5. Run this command again
java -cp minecraft-server.jar com.mojang.minecraft.server.MinecraftServer
You can access my server by this link, try it out if you like.
http://www.minecraft.net/play.jsp?server=3155c2ae2e916b23d93050e517c1411d
Errors you may get if you didn’t follow the above:
Failed to load Main-Class manifest attribute from
minecraft_server.jar
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.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334)
Could not find the main class: minecraft-server.jar. Program will exit.
Recent Comments