Skip to main content

Can't install Java 7 on Mac

1 reply [Last post]
rondelion
Offline
Joined: 2012-02-06
Points: 0

Hi,

I have followed the instructions on http://jdk7.java.net/macportpreview/.

The java command works from the bin directory where the executable is located,

but not from other directories and causes the following message:

$ bin/java
-bash: bin/java: Bad CPU type in executable

I tried to set JAVA_HOME as follows, but does not make a difference.

$ export JAVA_HOME=/Library/Java/JavaVirtualMachines/JDK¥ 1.7.0¥ Developer¥ Preview.jdk/Contents/Home

My system is an Intel Core Duo Mac, OS X 10.6.8.

Any thought about it?

It might be a VERY basic question but I appreciate your help!

-- Naoya A.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rondelion
Offline
Joined: 2012-02-06
Points: 0

> The java command works from the bin directory where the executable is located,

It was wrong. The command worked was that of jdk6 for which PATH was defined.

So, the java command from jdk7 doesn't work at all on my machine even after

adding the path:

$ export PATH=${JAVA_HOME}/bin:$PATH