Glassfish Update Tool on MAC OS

There will not be any JAVA_HOME set by default on MAC OS and also it will not be in the standard folder way as in case of Windows / Solaris. The Default Java would be in the /System/Library/Frameworks/JavaVM.framework/Versions/ directory with each version like 1.3, 1.4 installed. Also the directory structure would be

narayana-rallabandis-macbook:1.5.0 narayanarallabandi$ pwd
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
narayana-rallabandis-macbook:1.5.0 narayanarallabandi$ ls -la
total 0
drwxr-xr-x   9 root             wheel   306 Jun  2 13:31 .
drwxr-xr-x  14 root             wheel   476 May 29 17:27 ..
drwxr-xr-x  11 root             wheel   374 May 29 17:27 Classes
drwxr-xr-x  35 root             wheel  1190 May 29 17:27 Commands
drwxr-xr-x  13 root             wheel   442 May 29 17:27 Headers
drwxr-xr-x  12 root             wheel   408 Jun  3 19:46 Home
drwxr-xr-x  45 _update_sharing  wheel  1530 May 29 19:00 Libraries
drwxr-xr-x  25 root             wheel   850 Jun  4 10:07 Resources
drwxr-xr-x   4 root             wheel   136 Jun  3 19:47 lib
narayana-rallabandis-macbook:1.5.0 narayanarallabandi$

So the default update tool which comes with glassfish would not work since the same has the command starting with ""$JAVA_HOME"/bin/java -Dcom.sun.updatecenter.home="$UPDATECENTER_HOME" -cp ....."

Execution will throw error ./bin/updatetool: line 13: /bin/java: No such file or directory
We can circumvent this by replacing "$JAVA_HOME"/bin/java " with "/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java" since the Java executable will be in the Commands folder of the JAVA_HOME



Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

I was part of Sun R&D in Java CAPS and later Glassfish ESB. I moved from R&D to Consulting. I am currently working as a Solution Architect in Oracle Consulting Services (India). I was sharing my experience w.r.t. Java CAPS and other technologies during Sun period. Now in Oracle world I share my experiences with Oracle FMW product line as well as other Oracle Technologies and products.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today