How to install Java 7 EE SDK download as .sh file for Mac OSX

webworm picture webworm · Sep 13, 2013 · Viewed 11.6k times · Source

I am new to developing Java on Mac OSX. I wanted to download the Java 7 EE SDK so I could both desktop/mobile/enterprise development with Java. The download file is .sh (specifically java_ee_sdk-7-jdk7-macosx-x64) which I am not familiar with. The Java 7 SE SDK is a .dmg file which is the format I expected for the Enterprise Edition instead of the .sh file.

  1. Why are the SE and EE editions different file formats? (.sh vs .dmg)
  2. How do I install the Enterprise Edition being that it is a .sh file?

*Note: Currently the only JRE I have installed on the Mac is the Apple version which I understand has been deprecated.

Answer

Dev picture Dev · Sep 13, 2013

Run it at the command line.

From the install manual: Java Platform, Enterprise Edition 7 SDK - Installation Instructions

Solaris, Linux, and Mac OS X systems:

  • If necessary, grant execute permissions to the distribution file: chmod +x ./ distribution-filename

  • At the command prompt, type: sh ./ distribution-filename

For future reference a *.sh file is a shell script. You can inspect the shebang (#!) at the first line of the file to see what shell should be used to interpret the script. In the case of the JavaEE 7 installer the shebang is #!/bin/sh which indicates a Bourne compatible shell should be used.