Installing 64bit Java 7 - Cannot Execute Binary File

Posted by warpstack on Ask Ubuntu See other posts from Ask Ubuntu or by warpstack
Published on 2012-09-16T07:07:07Z Indexed on 2012/09/16 9:49 UTC
Read the original article Hit count: 311

Filed under:
|
|
|

So I downloaded the latest version of Java from Oracle so I could get a 64bit JVM on Ubuntu Server 10.10. After extracting the file and updating the alternatives I went to check my installation by running java -version and I get this error: -bash: /usr/bin/java: cannot execute binary file

I'm at a loss for what to do here. My alternatives menu looks like this:

  Selection    Path                                           Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-6-openjdk/jre/bin/java        1061      auto mode
  1            /usr/lib/jvm/java-6-openjdk/jre/bin/java        1061      manual mode
  2            /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java   1051      manual mode
* 3            /usr/lib/jvm/jdk1.7.0/bin/java                  3         manual mode

After restarting the system I seem to be getting a totally new error when checking the java version.

usr/bin/java: 1: Syntax error: end of file unexpected (expecting ")")

© Ask Ubuntu or respective owner

Related posts about installation

Related posts about server