views:

169

answers:

4

I have installed jdk1.6.0_21 and sqldeveloper(using alien) on debian(lenny). Now when I run sqldeveloper it asks for J2SE installation path, after I type the jdk path it exits with the below error message.

Oracle SQL Developer
 Copyright (c) 2008, Oracle. All rights reserved.  

Type the full pathname of a J2SE installation (or Ctrl-C to quit), the path will be stored in ~/.sqldeveloper/jdk
/usr/java/jdk1.6.0_21
/opt/sqldeveloper/sqldeveloper/bin/../../ide/bin/launcher.sh: line 430: /root/.sqldeveloper/jdk: No such file or directory
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
Error: SQL Developer can't recognize the JDK version

please help me out..

A: 

There are several possible causes for this error message:

  • The VM can't find the rt.jar file
  • The VM and the rt.jar file don't match (e.g. VM is version 1.6.x, rt.jar is version 1.4)
  • The JDK wasn't installed properly

What's the output of the following commands?

which java
java -version
/usr/java/jdk1.6.0_21/bin/java -version
Codo
thanks for response.. I installed JDK using alien(I first converted rpm to deb and then ran dpkg since I didn't get deb package from oracle site debian repository is not updated). I ran the commands and output is as below. which java : /usr/bin/java. java -version : java version "1.6.0_0"OpenJDK Runtime Environment (build 1.6.0_0-b11)OpenJDK Client VM (build 1.6.0_0-b11, mixed mode, sharing)./usr/java/jdk1.6.0_21/bin/java -version : Error occurred during initialization of VMjava/lang/NoClassDefFoundError: java/lang/Object.So How can I install JDK with out .deb package?
hnm
A: 

When you get several error messages that don't seem to make any sense, start by looking at the first error. In this case, that would be:

/root/.sqldeveloper/jdk: No such file or directory

It looks like sqldeveloper is trying to write the file, and failing. Are you running this as root? If not, can you think of any reason why sqldeveloper would think that your home directory is /root/?

Mike Baranczak
yes I am running as root. Even if I run as other user I get the same error - /home/<USER>/.sqldeveloper/jdk: No such file or directory
hnm
A: 

It looks as if the two java versions (OpenJDK accessible via /usr/bin/java and JDK 1.6.0_21 get mixed up). I can only guess how it can be solved:

  • run update-alternatives --set java /usr/java/jdk1.6.0_21/bin/java
  • try to uninstall OpenJDK
  • possibly, you need to do both
Codo
A: 

Finally I found the problem, JDK was not installed properly. I installed a fresh copy of OpenJDK after that it is working fine.

hnm