Installing JDeveloper on Mac OS X Lion (10.7)

One of the more popular blog entries on my blog is the one that give the instructions for install JDeveloper on Mac.

This is quite surprising considering the low percentage of mac users that show on our JDev users statistics gathering system. 

It was based on instruction that were written by Marc Chanliau from our FMW security team - he just sent over a new set of instructions for those of you who are upgrading to Lion OS X 10.7. So here are Marc's instructions:

[Note - for those who don't feel like reading instructions there is now also a video showing installation steps for JDeveloper on Mac]

As you may know, Apple does not to ship JDK6 with OS X Lion. So you first need to get JDK6 installed on Lion, which is really easy. One way to install JDK6 on Lion is to simply enter java -version at a terminal prompt. If the JDK is not installed, you'll be prompted by Lion to download and install it (just follow the installation screens provided by Apple).

Now that you have JDK6 installed on Lion, you need to download and install JDeveloper.

(1) Download JDeveloper from here to your desktop.  (Choose the *generic* Studio Edition from the pull-down menu.)     

(2) Double-click on the package you just downloaded, which should be jdevstudio1112Oinstall.jar. Be patient because it may take a few moments for the first screen of the JDev Installer to come up.

(3) Follow the Installer's step. The tricky part is when you get prompted for providing the path to you local JDK. When you get there, just follow step (4) below.

(4) To make it easy for the JDev Installer to find the all Java libs it's looking for, you need to run the following bash script. Just copy the script below in a text editor and save the file as jdev_on_lion.sh (or any other name.sh you choose).  Here is the bash script:

#!/bin/bash 

mkdir /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6

mkdir /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6/bin

ln -s /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/bin/java /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6/bin/java

ln -s /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/bin/javac /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6/bin/javac

ln -s /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/bin/javap /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6/bin/javap

ln -s /System/Library/Java/Support/Deploy.bundle/Contents/Home/bin/javaws /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6/bin/javaws

ln -s /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/bin/jar /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6/bin/jar

ln -s /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/bin/xjc /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6/bin/xjc

mkdir /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6/lib

ln -s /system/library/java/javavirtualmachines/1.6.0.jdk/contents/classes/classes.jar /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6/lib/tools.jar

mkdir /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6/jre

mkdir /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6/jre/bin

ln -s /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/bin/java /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6/jre/bin/java

mkdir /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6/jre/lib

ln -s /system/library/java/javavirtualmachines/1.6.0.jdk/contents/classes/classes.jar /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6/jre/lib/rt.jar

(5) Now that you've saved the script as described in step (4), you need to run it. Before running it, however, you need to change the file access permissions by entering the following command at a terminal prompt: chmod +x jdev_on_lion.sh

(6) You're ready to run the script. Enter the following command at a terminal prompt: ./jdev_on_lion.sh (if the bash shell complains that some permissions are (still) denied, just enter the command preceding it with "sudo" (you'll be required to enter your Mac password), that will always work!)

(7) Now you should see the JDK's path automatically entered in the JDev install screen. 

(8) You just need to follow the remaining JDev Installer steps to complete installation.

Thanks Marc.


Comments:

Or you could just read the JDeveloper release notes, which you should be doing anyway -- they're far shorter and work just fine for Lion (apart from not telling you how to download Java first):

http://www.oracle.com/technetwork/developer-tools/jdev/shermanrelnotes-405777.html#install

Posted by guest on August 29, 2011 at 10:22 AM PDT #

I have this solution to install jdeveloper but when i try executing the .sh file it gives me that no such directory error message so what can i do now

Posted by guest on September 03, 2011 at 08:42 AM PDT #

To the poster above who points to Oracle's link to install JDev on Lion: First off, the link provided was updated way *before* Lion was out, second, the JDK referred to in that link is installed in /SystemLibrary/Frameworks/JavaVM.framework/Versions/1.6.0, which is not true in Lion (that link has been clearly deprecated by Apple). In Lion, the JDK is installed *by the user* (not Apple) in /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/home (big difference!). So, I really doubt the poster managed to install JDev on Lion based on the information he gives...

Posted by guest on September 04, 2011 at 11:37 AM PDT #

I also needed to set the JAVA_HOME variable in the .profile

Posted by rc on September 10, 2011 at 05:00 AM PDT #

As to the person that was having issues with the no such directory messages, the poster above was hinting at directory differences but what I found to be the key difference was to examine the case differences in the paths. Mac os X is case sensitive and the directions in the posting are all lower case whereas if you actually look through the paths you will find that the majority of the paths are mixed cased...

Posted by guest on September 10, 2011 at 05:43 PM PDT #

(3) Follow the Installer's step. The tricky part is when you get prompted for providing the path to you local JDK. When you get there, just follow step (4) below.

You are right about the tricky part. The installer still does not pick up the path to the local JDK. Am I missing something. Is there an env variable to be set? What is the path? Maybe I can type it in.

Thanks for your help.

Posted by guest on October 04, 2011 at 03:28 PM PDT #

Hi Shay,

sudo ./jdev_on_lion.sh

worked like a charm for me.

I then navigated to /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6 in the JDeveloper Installer via browse and it recognised the Apple JDK 6.

Thanks again for the (much needed) guidance.

I'm starting developing in Oracle SOA Suite and ADF and BPEL at work on Windows
so it's nice to be able to pay around on the Mac at home.

Regards,
Derek Bolli, North Sydney, Australia

Posted by guest on October 28, 2011 at 06:32 AM PDT #

Hi Shay,

thanks for the post.

Really helpful.

Filip Huysmans, Contribute, Belgium

Posted by Filip Huysmans on November 29, 2011 at 06:23 AM PST #

Where do I save my text document jdev_on_lion.sh and after I enter
sudo ./jdev_on_lion.sh it sometimes asks for a password and then it doesn't let me type anything? If someone could help, it would be greatly appreciated because I am very confused.

Posted by guest on December 03, 2011 at 09:49 AM PST #

A further tip for a Lion install of 11.1.2.1.0.

Under the <jdev_home>/jdeveloper the "jdeveloper.app" can be copied into your OSX Dock to allow you to launch JDev without having to locate it via the Finder.

CM.

Posted by Chris Muir on December 05, 2011 at 11:23 PM PST #

Is JDeveloper 11.1.1.5.0 supported on Lion?

Posted by MattC on January 11, 2012 at 01:47 PM PST #

yes

Posted by Shay on January 13, 2012 at 10:06 AM PST #

Thanks!

Posted by MattC on January 13, 2012 at 10:09 AM PST #

worked like a charm! thanks, super easy.

Posted by kobby on January 13, 2012 at 01:24 PM PST #

For those with a JDeveloper install on Snow Leopard who are upgrading to Lion, installing JDK6 was the only step required to get JDeveloper (11.1.1.5) working for me.

Posted by MattC on January 29, 2012 at 05:13 PM PST #

Dear Shay
I have problem to Run my program in jdeveloper.
Compiling...
[11:16:19 PM] Successful compilation: 0 errors, 0 warnings.
[Application PlaceholderDCApp is bound to Server Instance IntegratedWebLogicServer]
[Starting Server Instance IntegratedWebLogicServer]
#### Server Instance IntegratedWebLogicServer could not be started: Error starting Server Instance.
Can you help me,pleas?

Posted by guest on February 05, 2012 at 12:07 PM PST #

guest - sounds like something got messed up with your integrated WebLogic Server - try and just remove the defaultdomain directory from your user's system directory - then restart JDeveloper and the Weblogic instance will be re-created.

Posted by Shay on February 06, 2012 at 11:22 AM PST #

Tanks!

Posted by guest on February 07, 2012 at 12:09 AM PST #

Shay, I am attempting to install a patch to JDev 11.1.1.5 as instructed via MOS using OPatch. I have installed OPatch, but when I do the following, I receive an error:

$ opatch -help
/Users/username/Oracle/jdk/bin/java is not a valid executable for this platform. OPatch cannot proceed!

Here are the contents of my Oracle and Middleware folders: http://pastebin.com/U58J8C9D

I attempted the following in an effort to point to a java executable:

$ opatch -help -jdk /system/Library/java/JavaVirtualMachines/1.6.0.jdk/contents/home/bin
/system/Library/java/JavaVirtualMachines/1.6.0.jdk/contents/home/bin/bin/java is not a valid executable for this platform. OPatch cannot proceed!
OPatch returns with error code = 1

How can I correctly point to java using the opatch command line?

Posted by MattC on March 04, 2012 at 12:20 PM PST #

MattC - I'm not sure but it looks like you have a mistype .../bin/bin...

Posted by Shay on March 05, 2012 at 04:41 PM PST #

Just another comment here that I got reports that changing the JDeveloper look and feel( Tools->Preferences->Environment) to "Mac OS X" resolved some Swing display issues for customers - so if you are using JDeveloper on Mac you might want to try it out.

Posted by Shay on March 08, 2012 at 11:19 AM PST #

Hi Shay

Im having a problem changing the permission for my .sh file.

when i enter chmod +x filename.sh into the terminal it responds with: no such file or directory.

The .sh file is currently located on my desktop, and I'm running OS X 10.7.2

Any suggestions to what might be wrong?

Posted by guest on March 13, 2012 at 10:41 AM PDT #

Hi guys

Im having a problem running the shell script.

I just get this error: /bin/bash : bad interpreter: No such file or directory

Any suggestions?

Thanks in advance.

Posted by guest on March 13, 2012 at 10:57 AM PDT #

Hi Shay,

I followed the steps but when I run the shell script, I get "operation not permitted" and when I add the "sudo" at the beginning I get "sudo: unable to execute ./jdev_on_lion.sh: Operation not permitted". Could you help me to make it work please ?

Posted by ashley on March 14, 2012 at 06:21 PM PDT #

Hi Ashley,

There is a bug in OSX 10.7.3 that prevents the script from running if you used TextEdit to save or edit it. It produces the error you describe when you try to run it. See http://reviews.cnet.com/8301-13727_7-57374676-263/workarounds-for-quarantine-bug-in-os-x-lion/

To fix it run the command : xattr -d com.apple.quarantine ./jdev_on_lion.sh

Then try to execute again.

Ta,
Pete.

Posted by Peter Smith on March 17, 2012 at 04:40 AM PDT #

Hi All,

I got JDev 11.1.1.5.0 working OKish on Lion - there were some glitches. Now I have installed JDev 11.1.1.6.0 on OSX 10.7.3. The installation worked OK using the instructions above, but the Integrated WebLogic Server will not install. When trying to start the Integrated WebLogic Server I get the following message:

[Waiting for the domain to finish building...]
[12:24:27 PM] Creating Integrated Weblogic domain...
[12:24:52 PM] Error processing Integrated Weblogic domain:The Server Instance cannot be started because the Integrated Weblogic domain was not built successfully.

I got in touch with Oracle Support and they have just pointed out to me that JDeveloper is not supported on OSX 10.7 (Lion).

Has anyone managed to get it (JDev 11.1.1.6.0) to work nevertheless and what did you do?

Thx
John

Posted by John Aylward on March 29, 2012 at 03:33 AM PDT #

Hi have the same problem, on OSX 10.7.3,
using oracle 11.1.2.1.0
The Server Instance cannot be started because the Integrated Weblogic domain was not built successfully.

any ideas will be appreciated .

Posted by abdimuna on April 10, 2012 at 10:04 AM PDT #

Update on my issue above. JDeveloper IS supported on OSX 10.7.3. The issue is NOT resolved however. I will update when further progress is made.

Posted by John Aylward on April 11, 2012 at 02:26 AM PDT #

Hi, for those having the Weblogic domain problem in MAC OS X 10.7.3.
Here is the solution:

1. Quit the Jdeveloper (for me 11.1.2.1.0 )
2. Save all your works to other locations.(backup)
3. delete the .developer directory in you home directory by
rm -rfv ~/.jdeveloper
4. Start the Jdeveloper with new configuration, and it will ask you for WebLogic Domain Recreation.
5. Have funny

Tweeter: @abdimuna1

Posted by abdimuna1 on April 11, 2012 at 04:03 AM PDT #

Ok, this is a very ugly hack but does workaround the integrated weblogic domain creation trouble.
1 - The problem seems to be that the variable ADRS_DOMAIN_PASSWORD does not get set, this in turn makes the CreateDefaultDomain.py fail.
1.1 - We try to tweak CreateDefaultDomain.py to circumvent the problem but it gets rewritten every time that the creation process gets invoked, so direct edition is not an option.
2 - Then, you have to copy CreateDefaultDomain.py to some location out of your .jdeveloper dir and edit it.
Locate the file /Users/xxx/.jdeveloper/systemXXX/o.j2ee.adrs/CreateDefaultDomain.py and copy it wherever you want.
2.1 - The edition shall set the desired variable instead of fail.
Change:
if not 'ADRS_DOMAIN_PASSWORD' in os.environ:
print("Error: ADRS_DOMAIN_PASSWORD environment variable not set.")
exit()
For:
if not 'ADRS_DOMAIN_PASSWORD' in os.environ:
os.environ['ADRS_DOMAIN_PASSWORD']="weblogic1"
3 - Now the caller script needs to be diverted to our patched file. Locate the file /Users/xxx/Oracle/Middleware/oracle_common/common/bin/wlst.sh that matchs whatever install configuration you made.
3.1 - At the very bottom of the file make the next edit.
Change:
# Delegate to the main script...
"${WL_HOME}/common/bin/wlst.sh" "$@"
For:
if [ "$1" == "/Users/xxx/.jdeveloper/systemXXX/o.j2ee.adrs/CreateDefaultDomain.py" ]
then
"${WL_HOME}/common/bin/wlst.sh" "WHAT EVER PATH TO YOUR PATCHED SCRIPT"
else
# Delegate to the main script...
"${WL_HOME}/common/bin/wlst.sh" "$@"
fi

Remember shell scripting is picky about white spacing. We make this work for a jdev 11.1.1.3.0. Hope it works for all you other people in jdeveloper cronic pain.

Posted by guest on April 17, 2012 at 01:26 PM PDT #

Oh, forgot to tell that edition to the wlst.sh script may end up yielding the strange error bad interpreter: Operation not permitted. First time we edited the script with TextEdit and seam to mixed line termination characters or something. Second time edited with vim with not problem at all.

Posted by redrage on April 17, 2012 at 01:37 PM PDT #

Should be some ppl out there with these directory names, correct case and with sudo. This one worked for me :) Great guide btw

sudo mkdir /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6

sudo mkdir /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/bin

sudo ln -s /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/bin/java /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/bin/java

sudo ln -s /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/bin/javac /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/bin/javac
sudo ln -s /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/bin/javap /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/bin/javap

sudo ln -s /System/Library/Java/Support/Deploy.bundle/Contents/Home/bin/javaws /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/bin/javaws

sudo ln -s /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/bin/jar /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/bin/jar

sudo ln -s /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/bin/xjc /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/bin/xjc

sudo mkdir /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/lib

sudo ln -s /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Classes/classes.jar /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/lib/tools.jar

sudo mkdir /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/jre

sudo mkdir /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/jre/bin

sudo ln -s /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/bin/java /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/jre/bin/java

sudo mkdir /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/jre/lib

sudo ln -s /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Classes/classes.jar /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/jre/lib/rt.jar

Posted by calmlow on April 18, 2012 at 08:54 AM PDT #

Hi

I have a problem when starting WebLogic Integrated. The error is as follows:
Error: ADRS_DOMAIN_PASSWORD environment variable not set.

Could you tell me the solution?
The above comments are not executed.
Is there any solution?

Thank you.

Posted by JRB on April 26, 2012 at 05:22 AM PDT #

Problem running/deploying a JSF page...

WebLogic starts but the page seems not to deploy. Log shows <BEA-000360> <Server started in RUNNING mode>

only this, and nothing more....

I can connect to WLS using IP address and port, log in to console.

Tried using path /faces/MyPage.jsf but no joy.

WLS integrated server does not shut down cleanly.

OSX 10.7.3 fully patched with Java Flashback fix also.

About
-----

Oracle JDeveloper 11g Release 2 11.1.2.1.0
Studio Edition Version 11.1.2.1.0
Build JDEVADF_11.1.2.1.0_GENERIC_110907.2314.6081
Copyright © 1997, 2011 Oracle and/or its affiliates. All rights reserved.
IDE Version: 11.1.2.1.38.60.81
Product ID: oracle.jdeveloper
Product Version: 11.1.2.1.38.60.81

Version
-------

Component Version
========= =======
Oracle IDE 11.1.2.1.38.60.81
Java(TM) Platform 1.6.0_31

Posted by Andrew Wolfe on April 29, 2012 at 01:48 PM PDT #

I had to make a few changes to correct the case within the script, here is the script with my updates.

As a few commenters have said, don't save this in TextEdit.

#!/bin/bash
mkdir /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jdk6
mkdir /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jdk6/bin
ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jdk6/bin/java
ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/javac /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jdk6/bin/javac
ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/javap /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jdk6/bin/javap
ln -s /System/Library/Java/Support/Deploy.bundle/Contents/Home/bin/javaws /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jdk6/bin/javaws
ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/jar /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jdk6/bin/jar
ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/xjc /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jdk6/bin/xjc
mkdir /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jdk6/lib
ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/contents/classes/classes.jar /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jdk6/lib/tools.jar
mkdir /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jdk6/jre
mkdir /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jdk6/jre/bin
ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jdk6/jre/bin/java
mkdir /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jdk6/jre/lib
ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/contents/classes/classes.jar /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jdk6/jre/lib/rt.jar

Posted by Rhys on July 19, 2012 at 03:59 AM PDT #

So has anyone managed to get JDeveloper on Mountain Lion to show the java classes as source? It works on linux and windows, I can select say JLabel setFont and go to declaration and get the source for setFont displayed. Currently on Mountain Lion I am only getting what appears to be a disassembled class file with only a class specification.

Posted by Tony on August 21, 2012 at 12:26 AM PDT #

From Colombia, thank you very much for sharing the information, it was very useful

Posted by Julian Lasso on August 22, 2012 at 09:37 AM PDT #

These Steps Worked as a charm for me , Thanks Shay...

1- Create a file named dev_on_lion.sh

with the following content:

sudo mkdir /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6

sudo mkdir /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/bin

sudo ln -s /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/bin/java /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/bin/java

sudo ln -s /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/bin/javac /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/bin/javac
sudo ln -s /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/bin/javap /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/bin/javap

sudo ln -s /System/Library/Java/Support/Deploy.bundle/Contents/Home/bin/javaws /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/bin/javaws

sudo ln -s /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/bin/jar /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/bin/jar

sudo ln -s /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/bin/xjc /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/bin/xjc

sudo mkdir /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/lib

sudo ln -s /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Classes/classes.jar /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/lib/tools.jar

sudo mkdir /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/jre

sudo mkdir /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/jre/bin

sudo ln -s /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/bin/java /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/jre/bin/java

sudo mkdir /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/jre/lib

sudo ln -s /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Classes/classes.jar /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6/jre/lib/rt.jar

2- Copy the created file under the path: /Users/<YOUR_USER_NAME>/jdev_on_lion.sh

3- Open a terminal window and issue this command twice:

chmod +x /Users/<YOUR_USER_NAME>/jdev_on_lion.sh

4- issue the following command twice:

./jdev_on_lion.sh

5- This command will create the directories of JDK 6 needed to be bundled to the Jdeveloper instalation.

So "Manualy" , Go to the JDeveleoper installation wizard and browse for the following path and press ok.

/system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6

Posted by Mahmoud Ahmed on November 01, 2012 at 02:17 PM PDT #

I'm always trying to understand what happens *before* executing a command or script. But a simple mind like I cannot understand a complicated script like yours. So I cleaned it up a little. It still does exactly the same steps as before, it's only easier to understand us dummies:

------------------ snip -----------------------

cd /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/

sudo mkdir -p jdk6/bin jdk6/lib jdk6/jre/bin jdk6/jre/lib

for i in java javac javap jar xjc; do
sudo ln -s `pwd`/bin/$i jdk6/bin/
done

sudo ln -s /System/Library/Java/Support/Deploy.bundle/Contents/Home/bin/javaws jdk6/bin/
sudo ln -s `pwd`/bin/java jdk6/jre/bin/

sudo ln -s `pwd`/../Classes/classes.jar jdk6/lib/tools.jar
sudo ln -s `pwd`/../Classes/classes.jar jdk6/jre/lib/rt.jar

------------------ snip -----------------------

Execute as script file or separate commands, run installer, done!

(for sources and docs on Mac either download the Java-Developer-Package (found in the Developer Area on apple.com) or directly from Oracle and install yourself).

Posted by guest on November 17, 2012 at 06:39 AM PST #

In case you want to install JDev 11.1.2.3.0 use 1.6 version for JVM for initial command (java -jar ...). Using 1.7 the installation process crashed even the selected jdk was 1.6

Posted by guest on January 12, 2013 at 01:12 PM PST #

Run the following command:
java -jar <installer-jar-file>

This would automatically populate the JDK in the install screen

Posted by Anirban Bagchi on February 01, 2013 at 02:55 AM PST #

i am not able to install!!!i have jdk7, osx10.8.3 and please can anyone help me with the script i have to run to get jdk7 in the installation screen.

thank you.

Posted by arpit on April 08, 2013 at 09:13 PM PDT #

Thanks to Shay and to the comments that followed. Like several others encountered, I had trouble creating the directories in Step 4. I had to use 'sudo' like a few others had commented. I have verified the directories and links were created.

When I get to the JDK Selection window, the JDK still cannot be found. I clicked the BROWSE button and navigated to /System/Library/Java/Javavirtualmachines/1.6.0.jdk/Contents/Home/jdk6. Now I get an error: "Invalid Java Home /System/Library/Java/Javavirtualmachines/1.6.0.jdk".

Any help would be appreciated.

Posted by guest on May 14, 2013 at 01:46 PM PDT #

Team,
I installed JDeveloper and JDK1.7. But while executing the above script (step 4), its giving error. I tried to execute the script with sudo command as well (sudo: unable to execute ./jdev_on_lion.sh: No such file or directory) but got the above error. I am executing the script from local folder where file is saved. Kindly help me.

Additional information
Mac OS version: 10.7.5
Editor used for saving script: TextEdit
JDK version:1.7
Kindly let me know in case you need any additional information.

Posted by guest on May 17, 2013 at 10:19 AM PDT #

Dear guys from May 17.

You can manually run it via the command line.
Open a Terminal window.
Enter each line individually from the script.

i.e.
sudo mkdir /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6

You will be prompted for your Mac login password. This should only happen once.

then continue to enter the rest of the commands.
sudo mkdir /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6/bin
sudo ln -s /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/bin/java /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/jdk6/bin/java

...

Posted by AZWildk4t on May 17, 2013 at 10:37 AM PDT #

Hi Shay,

Thoughts on how to accomplish this process using JDK 1.7 on OS X 10.8.4 when there is no JDK 1.6 installed? The Oracle JDK 1.7 deploy structure is a bit different it seems. JDev install fails about 50% of the way through.

Posted by Frank Rizzo on July 21, 2013 at 02:39 PM PDT #

I recommend posters to this blog post have a look at the following blog:

https://blogs.oracle.com/blueberry/entry/how_to_saddle_your_mountain

CM.

Posted by Chris Muir on July 29, 2013 at 07:01 PM PDT #

Instead, enter this into a terminal:

/usr/libexec/java_home -v1.6

It will give you a full path to the jdk. Copy/Paste the output in step 3 and you're done.

(use -v1.7 for jdk7)

Posted by Neil Cochrane on October 21, 2013 at 02:18 PM PDT #

Thanks, Shay for sharing the tips for installation of JDev in Mac.
-Vamsi.

Posted by Vamsi on November 05, 2013 at 07:18 PM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

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