1 Reply Latest reply on Feb 17, 2016 11:51 AM by jgozal

    Installing Java SDK 7U67 and Running Minecraft Server on Edison


      The worlds smallest minecraft Server !!!


      minecraft edison.PNG



      I decided to try a Real world test of the edison modules performance.  What better way than to get a micro Minecraft server up and running!!

      Log in as root.  make sure your network connection is working.

      First make a  /home/root/bin directory

      cd ~

      mkdir bin

      then  make a directory in /home/root called java

      mkdir java

      cd java

      Get the Java SDK from oracle using Wget into the Java directory

      wget --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u67-b01/jdk-7u67-linux-i586.tar.gz"

      (The SDK is not truely needed only the runtime, but I wanted to be able to do other java development later)

      tar -xvzf  jdk-7u67-i586.tar.gz

      Test run java

      cd jdk1.7.0_67/bin

      ./java -version

      root@Edison1:~/java/jdk1.7.0_67/bin# ./java -version        on1:~/ja                            java version "1.7.0_67"

      Java(TM) SE Runtime Environment (build 1.7.0_67-b01)

      Java HotSpot(TM) Client VM (build 24.65-b04, mixed mode)


      now make a soft link from your home/bin to the java runtime

      cd ~/bin

      ln -s /home/root/java/bin/java java

      ls -al

      You should see the link

      root@Edison1:~/bin# ln -s /home/root/java/bin/java java

      root@Edison1:~/bin# ls -al

      drwxr-xr-x    2 root    root          4096 Oct 19 14:42 .

      drwxr-xr-x    9 root    root          4096 Oct 19 02:30 ..

      lrwxrwxrwx    1 root    root            24 Oct 19 14:42 java -> /home/root/java/bin/java

      -rwxr-xr-x    1 root    root        11958 Oct  5 19:24 lein


      add the ~/bin directory to your path

      cd ~

      vi .profile

      add line below


      save the file

      At the shell prompt

      do: ( notice two .'s and the space)

      . .profile

      to reread the profile into your shell

      then try java -version  from home directory to see if simlink resolves and runs java

      cd ~

      java -version

      cd ~

      mkdir minecraft

      cd minecraft

      wget --no-check-certificate https://s3.amazonaws.com/Minecraft.Download/versions/1.8/minecraft_server.1.8.jar

      Run minecraft ... Be patient when starting,  it takes 10-20 seconds to start.. 

      Then It will fail with a eula.txt warning

      java -server -Xmx512M -Xms512M  -XX:ParallelGCThreads=2  -jar minecraft_server.1.8.jar  nogui

      stop the server if needed with ctrl-C

      Edit eula.txt and change  eula=false to eula=true

      Save file

      Rerun the server

      java -server -Xmx512M -Xms512M  -XX:ParallelGCThreads=2  -jar minecraft_server.1.8.jar  nogui


      You might get server overloaded messages but it should settle down after a few seconds. 


      During Play I do get some server overloaded messages but it is still stable  Lag is minimal with these settings and one user.

      Minecraft is a single threaded app so it can only use one core runnung at 500mhz

      The garbage collection for java has been set to run in the second core on the server start, If anyone has more ideas for tuning , let me know