8

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.

webworm
  • 10,587
  • 33
  • 120
  • 217

3 Answers3

8

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.

Community
  • 1
  • 1
Dev
  • 11,919
  • 3
  • 40
  • 53
  • Thank you! Any idea why the SE and EE versions are different formats? – webworm Sep 13 '13 at 20:02
  • 1
    @webworm Probably so they could use one installer for all unix-like platforms. – Dev Sep 13 '13 at 20:04
  • 1
    Different teams produce the SE and EE SDKs. The EE SDK doesn't need OS-specific configuration for the various Unix-like OSes, unlike SE. – Ian Evans Sep 13 '13 at 22:50
  • 1
    When I attempt to run this, it says it needs the DISPLAY variable set - what do I need to set it to? `a12-macmini-02:Downloads rdavis$ ./java_ee_sdk-7-jdk7-macosx-x64-ml.sh This program requires DISPLAY environment variable to be set. Please re-run after assigning an appropriate value to DISPLAY.` – therobyouknow Dec 16 '13 at 09:02
  • Be aware that the "JavaEE SDK" is basically just a lie; its a bundle package of the JDK, Glassfish community and some documentation all of which you can install/download separately. JEE is only a specification, you are free to just install the JDK and any JEE container of your choosing (JBoss, Weblogic, TomEE, ...). – Gimby Mar 06 '14 at 15:56
7

Found a solution in this link:

https://apple.stackexchange.com/questions/63381/installing-glassfish-on-mountain-lion

Tried the command export DISPLAY=:0 and it skipped the "This Program requires..." message.

Hope this helps

Community
  • 1
  • 1
Fritz
  • 1,144
  • 1
  • 13
  • 21
7

glassfish-3.1.2.2-unix.sh requires DISPLAY environment variable to be set. Please re-run after assigning an appropriate value to DISPLAY.

export DISPLAY=:0
chmod +x java_ee_sdk-7-jdk7-macosx-x64-ml.sh
./java_ee_sdk-7-jdk7-macosx-x64-ml.sh

tonymontana
  • 5,728
  • 4
  • 34
  • 53
user3388785
  • 71
  • 1
  • 2