Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I run Oracle SQL Developer on JDK 1.6 and everything else on 1.7?

How can I run Oracle SQL Developer on a version of Java it supports (1.6) while running Java 1.7 for everything else?

I can install both JDK's on my system, but I'm concerned with changing environment variables and having it affect more than just SQL Developer. Curious if there's elegant solutions to this.

I am having issues with SQL Developer (running off JDK 1.7) only returning 50 rows. <-- Feel free to address this specific issue as well. EDIT: The problem is not that it returns only 50 rows, this is standard, the problem is the inability to scroll down to see more rows on demand.

like image 427
Xonatron Avatar asked Oct 24 '11 13:10

Xonatron


People also ask

Which Java version is required for SQL Developer?

SQL Developer requires that the Java JDK 1.6. 0_11 or later (but not 1.7. n) be installed on the system, or that you install a SQL Developer for Windows kit that includes a JDK. If you need to install a JDK, go to http://www.oracle.com/technetwork/java/javase/downloads/ .

Is Jdk needed for Oracle SQL Developer?

Oracle SQL Developer requires the Java Development Kit (JDK) to run. If you are using Windows, you have the option to download a version of SQL Developer that includes the JDK.

Can I use SQL Developer with OpenJDK?

Note: there are various distributions of Java: OpenJDK, Oracle, Amazon Corretto, etc. They all will work with SQL Developer.


2 Answers

Just install Java7 as the default JDK in your system.

You can tell SQL Developer to use a specific JDK by editing the file sqldeveloper/bin/sqldeveloper.conf and add the line:

SetJavaHome /path/to/jdk 

If you are on Windows, you need to specify a correct Windows path of course:

SetJavaHome c:\Java\jdk16 

Update after two comments:

The above answer was added when SQL Developer 3.x was the current version. Apparently this does not work any longer for SQL Developer 4.x. It seems that SQL Developer 4.0 just scans the PATH to find a suitable JRE

like image 93
a_horse_with_no_name Avatar answered Oct 31 '22 17:10

a_horse_with_no_name


The location of JDK is configured when the SQL developer is first run.

If you need to change the jdk version, once already set in the first run, it can be changed in -
Windows: %APPDATA%\<product-name>\<product-version>\product.conf
Unix/Linux/Mac/Solaris: $HOME/.<product-name>/<product-version>/product.conf

SetJavaHome property needs to be changed and then SQL Developer is to be started.

like image 45
punita.gosar Avatar answered Oct 31 '22 16:10

punita.gosar