Installing 64 bit Java - Linux

Discussion in 'Bukkit Help' started by Kalebubbles, Aug 24, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Kalebubbles

    This Is possibly the wrong section / forums in general but I'm in need of help for my MineCraft Server.

    I run a VPS with 4ghz, 4gig ram, 64 bit Centos 5.4

    I've looked for an entire day and cannot find a tutorial on how to install Java 64 bit. Basically I ran the command

    Although It installed the 32bit Java and I cannot run the server with more than 1gig ram with 32bit Java. When I attempt to run this command


    I get told



    How can I install the 64 bit version of Java?

    Thanks in advanced for the help.

    Kaleb.

    My current java version: java-1.6.0-openjdk-1.6.0.0-1.22.1.9.8.el5_6.x86_64

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  2. Offline

    TnT

    What is the output of the
    Code:
    java -version
    command?

    You may have both installed, and you're PATH is setup to use the x86 Java only.
     
  3. Offline

    Kalebubbles


    [root@V-2308 ~]# java -version
    java version "1.6.0_20"
    OpenJDK Runtime Environment (IcedTea6 1.9.8) (rhel-1.22.1.9.8.el5_6-x86_64)
    OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

    bump

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  4. Offline

    RROD

    Ok, #1: Stop bumping, and remove all exisiting installations of Java.

    Assuming you're using WinSCP...
    2#: Download the RPM of Java JRE x64 (NOT OpenJRE - Bukkit doesn't like it)

    3#: Put this in a folder using WinSCP, open a console.

    4#: In console type: rpm -i [package-name]
    and hit enter.

    5#: Make a file that with "java -Xmx4096M -Xms4096M -jar bukkit.jar nogui" in it. Save and name it "run.sh".

    6#: Right-click "run.sh" and click properties. A set of about 9 boxes will appear. Tick them all if they are not already ticked (Or type '0777' in the text box below it).

    7#: Execute "run.sh" and your server should run.
     
  5. Offline

    Brain

    You cannot use more than 4GB with 32 Bit Java, but you can use almost 4GB. Have you tried 2GB or 3GB? Besides, you can't use all 4GB of RAM because you still need to run the Linux kernel and some other software.
    Also this command line sets the maximum heap size. You will need some additional memory for the actual JVM and Java-internal stuff. With 4GB RAM a maximum heap size of 3GB would be feasible.

    Oh, and I forgot something: If you specified too large a heap size, for example 5GB for a 32 Bit Java, you would see an error message like "Illegal heap size 5000M". The error message you provide expresses that the requested amount of memory is simply not available.
     
  6. Offline

    bassfader

    @Brain as far as I know you can't use more than 1.5GB Ram with the 32bit Java version, so using 3 or 4GB is definately out of question until he updates to java 64bit. (I think the real maximum was about 1.7GB or 1.8GB but its recommended to not use more than 1.5GB with the 32bit version)
     
  7. Offline

    Brain

    That depends on your OS. I've just tested OpenJDK on a 4GB 32 Bit Linux machine. It barfs at 3GB heap size, but runs fine with 2.5GB, so 2GB maximum heap size should work.
    32 Bit Windows with Sun/Oracle Java barfs at 2GB, that's true.
     
  8. Offline

    Kalebubbles

    thanks for the detailed help, this may be a /facepalm but how do i uninstall the current java? I really can't find any help at all, I don't know whether I'm searching the wrong key words but I really can't find anything relevant.

    bump

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  9. Offline

    7eggert

    http://linux.die.net/man/8/yum

    NEVER give permission 0777. At most, give 0755.

    777 means everybody can change the file and let you run what they want you to run.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  10. Offline

    Lolmewn

    Do you know how to uninstall Java on Linux?
    I think I know how to re-install Java 7 again afterwards.
     
  11. Offline

    Kalebubbles

    So I just java -version'd and It says
    Does that actually mean I have correct JDK64 Bit?
     
  12. Offline

    RROD

    You have OpenJDK. That in a way is just a 'spin off' from the actual Java. Get the Java JRE from the official Java Website.

    If you want to uninstall OpenJDK, you need the package name. Which I can't get for you because I don't know it. If you have a control panel for your VPS host, try and find out if you can uninstall it from there.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  13. Offline

    Lolmewn

    Mokay. Ill do some googling + VPS control stuffs
     
  14. Offline

    Kalebubbles

    I followed your advice and those are what I got afterwards :S

    Would you be able to help me with teamviewer or my VPS details and I would be willing to pay.
     
  15. Offline

    RROD

    I'm quite tied up atm, sorry but there's no more I can do for now.
     
  16. Offline

    Kalebubbles

    I've tried for nearly 2 days now, I've searched literally everything I can think of, I've cleared my entire O/S and reinstalled Centos 5.4 but I still can't launch from 4gig ram & when I do 3gig It gives me an error.

     
  17. Offline

    RROD

    Ok, perhaps it's not much to fix. If I can fix it I will charge £5.00 GBP per hr. If I can't fix it there will be no charge.
    Email me at [email protected]
     
  18. Offline

    7eggert

  19. Offline

    Kalebubbles

    I started my server before I went to bed last night running 1gb ram, I woke up to find 2.768Million lines of error.

    Here's the first part that started it
    Anyone know what could've caused that and what I can do to fix?
     
Thread Status:
Not open for further replies.

Share This Page