Reputation: 57
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
Upvotes: 1
Views: 15814
Reputation: 21
on the sqldeveloper home there is a file named sqldeveloper.sh (or datamodeler.sh) add the folowin line:
unset GNOME_DESKTOP_SESSION_ID
should be look like this:
#!/bin/bash
unset GNOME_DESKTOP_SESSION_ID
cd "`dirname $0`"/sqldeveloper/bin && bash sqldeveloper $*
That's all. Adios
Upvotes: 2
Reputation: 1295
I've got the same when i will install my SQL Developer as root, but use it as other user.. In my case looks like the Sql developer was makes file ~/.sqldeveloper/.... as root:root privilegies, but in home dir with sudo user.. It's strange but easy to fix as
chown youruser:yourgroup -R ~/.sqldeveloper
Upvotes: 1
Reputation: 1
Only replace in /opt/sqldeveloper/sqldeveloper/bin/sqldeveloper.conf
from: SetJavaHome ../../jdk
to: SetJavaHome /usr/lib/jvm/java-7-openjdk-amd64
Upvotes: 0
Reputation: 4182
You might want to issue the following command:
echo '/usr/lib/jvm/java-6-sun' > ~/.sqldeveloper/jdk
Upvotes: 2
Reputation: 57
Finally I found the problem, JDK was not installed properly. I installed a fresh copy of OpenJDK after that it is working fine.
Upvotes: 1
Reputation: 78795
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:
update-alternatives --set java /usr/java/jdk1.6.0_21/bin/java
Upvotes: 0
Reputation: 8374
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/?
Upvotes: 0
Reputation: 78795
There are several possible causes for this error message:
What's the output of the following commands?
which java
java -version
/usr/java/jdk1.6.0_21/bin/java -version
Upvotes: 1