MacOS – Unable to install ‘Java Platform, Enterprise Edition 7 (with JDK 7u45)’

javamacos

I have downloaded an java j2ee and jdk installer from Oracle

enter image description here

When I run it I got this error message:

$ ./java_ee_sdk-7-jdk7-macosx-x64-ml.sh
Extracting the installer archive...
Extracing bundled JDK...

Could not locate a suitable Java runtime.
Please ensure that you have Java 7 or newer installed on your system
and accessible in your PATH or by setting JAVA_HOME

At the moment I have only got java 6 in my MBP (running OSX 10.9.4).

I would have expected the installer is smart enough to run from the unpacked bundled JDK.

Is there any workaround?

Best Answer

The Enterprise Edition of the JDK does not contain the JRE -- you have to install that stand alone first and only then install the JDK as detailed here :

http://docs.oracle.com/javase/7/docs/webnotes/install/