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

2022-09-02 00:33:43

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.


答案 1

Just install Java7 as the default JDK in your system.

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

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 to find a suitable JREPATH


答案 2

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:
Unix/Linux/Mac/Solaris: %APPDATA%\<product-name>\<product-version>\product.conf$HOME/.<product-name>/<product-version>/product.conf

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


推荐