Results 1 to 14 of 14
  1. #1
    cheese5505 is offline Member
    Join Date
    Jul 2012
    Posts
    8
    Rep Power
    0

    Default Installing Java on Ubuntu Server

    I am currently trying to install 64-bit Java on an Ubuntu Server. I have extracted the folders, and attempted to start Java but it refuses to work. This is what is says:
    Java Code:
    -bash: ./jre1.7.0_04/bin/java: cannot execute binary file
    When I run "uname -a" this is the output:
    Java Code:
    Linux gms-l4h6iwu7i7p 3.0.0-12-generic-pae #20-Ubuntu SMP Fri Oct 7 16:37:17 UTC 2011 i686 athlon i386 GNU/Linux
    So it is a 64-bit server installation.
    Feel free to ask if you need any more information.

    -cheese5505

  2. #2
    noctarius is offline Member
    Join Date
    Jun 2012
    Location
    Remscheid, Germany
    Posts
    61
    Rep Power
    0

    Default Re: Installing Java on Ubuntu Server

    I made my own shellscript to install Java from the PPA repository:

    Java Code:
    #!/bin/sh
    if [[ $EUID ne 0 ]]; then
       echo "This script must be run as root" 1>&2
       exit 1
    fi
    
    # install apt helper tools
    apt-get install -y python-software-properties
    
    # add java repository
    add-apt-repository ppa:webupd8team/java
    apt-get update
    
    # install Oracle Java 7
    apt-get install -y oracle-java7-installer

  3. #3
    cheese5505 is offline Member
    Join Date
    Jul 2012
    Posts
    8
    Rep Power
    0

    Default Re: Installing Java on Ubuntu Server

    Does this install Java 7 64-bit?

  4. #4
    noctarius is offline Member
    Join Date
    Jun 2012
    Location
    Remscheid, Germany
    Posts
    61
    Rep Power
    0

    Default Re: Installing Java on Ubuntu Server

    Yeah it does (sorry for the late reply).
    This adds the PPA repository, the PPA OpenPGP Key and installes the most actual Oracle JDK 7 (64Bit)

  5. #5
    cheese5505 is offline Member
    Join Date
    Jul 2012
    Posts
    8
    Rep Power
    0

    Default Re: Installing Java on Ubuntu Server

    Quote Originally Posted by noctarius View Post
    Yeah it does (sorry for the late reply).
    This adds the PPA repository, the PPA OpenPGP Key and installes the most actual Oracle JDK 7 (64Bit)
    It gives me this error:
    update-alternatives: error: no alternatives for java.
    update-alternatives: error: alternative link /usr/bin/java is already managed by javaa.
    dpkg: error processing oracle-java7-installer (--configure):
    subprocess installed post-installation script returned error exit status 2
    Errors were encountered while processing:
    oracle-java7-installer

  6. #6
    noctarius is offline Member
    Join Date
    Jun 2012
    Location
    Remscheid, Germany
    Posts
    61
    Rep Power
    0

    Default Re: Installing Java on Ubuntu Server

    Have you tried to remove openjdk first?

  7. #7
    cheese5505 is offline Member
    Join Date
    Jul 2012
    Posts
    8
    Rep Power
    0

    Default Re: Installing Java on Ubuntu Server

    OpenJDK is not installed.

  8. #8
    noctarius is offline Member
    Join Date
    Jun 2012
    Location
    Remscheid, Germany
    Posts
    61
    Rep Power
    0

    Default Re: Installing Java on Ubuntu Server

    Is it a new clean Ubuntu installation or did you tried to install JVM before by hand? Maybe you fragged the update-alternatives ;-)

  9. #9
    cheese5505 is offline Member
    Join Date
    Jul 2012
    Posts
    8
    Rep Power
    0

    Default Re: Installing Java on Ubuntu Server

    Yes, I fragged them. *TIME TO FIND OUT HOW TO FIX*

  10. #10
    cheese5505 is offline Member
    Join Date
    Jul 2012
    Posts
    8
    Rep Power
    0

    Default Re: Installing Java on Ubuntu Server

    Ok, I found out how to fix it. I installed it... But it's not 64-bit as I can't run anything with over 2GB RAM and we have 12GB RAM.

  11. #11
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: Installing Java on Ubuntu Server

    Quote Originally Posted by cheese5505 View Post
    it's not 64-bit as I can't run anything with over 2GB RAM
    That's no indicator. Have you tried the -Xmx flag?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  12. #12
    cheese5505 is offline Member
    Join Date
    Jul 2012
    Posts
    8
    Rep Power
    0

    Default Re: Installing Java on Ubuntu Server

    Quote Originally Posted by DarrylBurke View Post
    That's no indicator. Have you tried the -Xmx flag?

    db
    That's what I'm using - it won't allow anything above 2GB. And I compared the java -version output with my local Ubuntu w/ 64bit java and they are different.

  13. #13
    noctarius is offline Member
    Join Date
    Jun 2012
    Location
    Remscheid, Germany
    Posts
    61
    Rep Power
    0

    Default Re: Installing Java on Ubuntu Server

    For me the above script installs 64Bit version of Java are you sure your linux is 64bit?

  14. #14
    cheese5505 is offline Member
    Join Date
    Jul 2012
    Posts
    8
    Rep Power
    0

    Default Re: Installing Java on Ubuntu Server

    Sorry for late reply - As you can see in my first post it is 64-bit. I'll attempt to run my program with 2gb RAM.

Similar Threads

  1. Installing sql server 2005 management studio express
    By adiotrox in forum Forum Lobby
    Replies: 1
    Last Post: 02-24-2012, 09:10 AM
  2. Replies: 0
    Last Post: 01-26-2012, 05:39 PM
  3. Installing WebSphere Application Server step by step
    By manideep.d132 in forum Reviews / Advertising
    Replies: 0
    Last Post: 01-23-2012, 07:35 PM
  4. Using mysql in Java on ubuntu
    By dearvivekkumar in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 11-30-2011, 09:36 AM
  5. Java TTS on Ubuntu with Festival
    By Desh Banks in forum Advanced Java
    Replies: 2
    Last Post: 01-06-2011, 12:09 AM

Tags for this Thread

Posting Permissions

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