Ensode.net
Google
 

Home
Blog
Guides
Tips
Articles
Utilities
Reviews
About Us
Contact us


Facebook profile

XML

Getting JDeveloper Going under Linux
Bookmark and Share

JDeveloper Splash Screen

My current project uses a lot of Oracle PL/SQL stored procedures. One of them was throwing an exception. The problem was not easy to find since there are stored procedures calling other stored procedures calling stored procedures.

I had read somewhere that JDeveloper comes with a PL/SQL debugger, and that it is a free download, therefore I decided to give it a shot. I installed it in my work Windows workstation and was able to debug and fix the problematic stored procedure.

I'm primarily an Eclipse guy, however I wanted to get more familiar with JDeveloper, since it had proved pretty handy when using Oracle as the database. I decided to install it on my laptop running the AMD 64 version of Fedora Core 5.

I downloaded the "Base Install", from here. The other two installs are for Windows and Mac OS, this one is supposed to work with all platforms that support JDK 1.5.

Installing JDeveloper consists of simply extracting the downloaded zip file. I created a jdeveloper directory under my home directory and extracted it in there.

To run it, there is a "jdev" Bourne Shell script under the jdev/bin directory. I executed this script and got the following errors:


Oracle JDeveloper 10g 10.1.3
Copyright 1997, 2005 Oracle.  All Rights Reserved

Error: hotspot VM not supported
Error: JDeveloper can't recognize the JDK version

The default JDK I have on my Fedora laptop is a 64 bit JDK, I thought that perhaps JDeveloper won't work with a 64 bit JDK. Luckily I also have a 32 bit version of JDK 1.5 installed. I changed both my JAVA_HOME environment variable and the PATH so that the 32 bit JDK is found first and tried again. Same error. What a head scratcher.

I then decided to take a peek at the jdev script, I opened it and found these lines:


if [ `expr "$s" : 'java version \"1\.[0-5].*\"'` -le 0 ]
then
echo "Error: JDeveloper can't recognize the JDK version"                
fi

Looks like this part of the script is looking at the output of "java -version" and comparing it to a regular expression.

The output of "java -version" for my default JDK is:


java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode)

Now, I'm no shell scipt or regular expression guru, but I believe that this output should match the expression and skip the conditional in the script. I'm not sure why JDeveloper did not like my JDK, but I simply deleted the conditional from it and tried again. This resulted in the following error:

Oracle JDeveloper 10g 10.1.3
Copyright 1997, 2005 Oracle.  All Rights Reserved

Error: hotspot VM not supported

At this point it looked like JDeveloper (unsurprisingly, since I removed the conditional from the script) went past not recognizing the JDK error, and is passing the "-hotspot" parameter to the Java executable, which in the JDK I have installed results in the above error message. After some snooping around, I found out that the jdev script has a configuration file called jdev.conf. I opened this file and found the following line:
SetJavaVM hotspot

I commented out that line and tried again. This time, finally, JDeveloper launched successfully.

I'm still not sure why JDeveloper wouldn't like my JDK, fortunately I was able to make it run, but I don't think I should have had to modify included scripts and configuration files to do so.

Now, the reason I wanted to try out JDeveloper is because of it's PL/SQL debugging capabilities. I didn't have Oracle installed, therefore I decided to install the freely downloadable Oracle Express Edition. Installation went smoothly, but operation is presenting it's own set of challenges (I'm no DBA, therefore a lot of this could be due to my own ignorance), but that is a topic for another time.


Java EE 6 Development With NetBeans 7
Java EE 6 Development With NetBeans 7


Java EE 6 with GlassFish 3 Application Server
Java EE 6 with GlassFish 3 Application Server


JasperReports 3.5 For Java Developers
JasperReports 3.5 For Java Developers