Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install 64-bit java on my Ubuntu server so I can host a Minecraft server. I have downloaded the package from, extracted the file (it has no extension, for me it's just called jre-7u5-linux-x64) and tried running it with:

sudo ./jre-7u5-linux-x64

but I get this error:

./jre-7u5-linux-x64: ./jre-7u5-linux-x64: cannot execute binary file

I have also tried renaming the file to jre-7u5-linux-x64.bin but I get the same error. uname -a shows

Linux 3.2.13-grsec-xxxx-grs-ipv6-64 #1 SMP Thu Mar 29 09:48:59 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

so I'm on a 64-bit system. The file is executable as confirmed through ls -l

I could install Java through apt-get but I wasn't sure if that's the 32-bit or 64-bit version. If there's a way to install the latest release of Java 64-bit through apt-get could someone let me know?

share|improve this question
Perhaps the file is corrupt. Try downloading it from again. – user3463 Jul 15 '12 at 17:41
I've redownloaded it and tried the process about 5 times now and I've checked the filesize every time. – Mark Twaign Jul 15 '12 at 17:42
Good to hear. Have you changed the permissions of the file to executable? – user3463 Jul 15 '12 at 17:43
Yep, the file is executable and I've confirmed that with ls -l – Mark Twaign Jul 15 '12 at 17:45
You need a 64-bit Ubuntu server, not a 32-bit Ubuntu server. Post the output from uname -a to confirm whether you've installed 32-bit or 64-bit Ubuntu. – Michael Hampton Jul 15 '12 at 17:46
up vote 0 down vote accepted

The file you downloaded should be an installer. Try running chmod +x ./jre-7u5-linux-x64 before you try to execute it. The command file ./jre-7u5-linux-x64 will tell you what type of file you have.

However, I would recommend installing the Java version available from the installer. The default install on a 64 bit O/S is 64bit Java. As noted in the comments, you will need to add a ppa to get the latest Oracle installer.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .