This has been discussed a number of times. the last thread was
https://community.oracle.com/thread/2266234?tstart=0
but the question was never properly answered.
This thread on StackOverflow gives the correct answer
http://stackoverflow.com/questions/16581065/j2se-sdk-configuration-in-oracle-sql-developer
When you install SQL Developer on a 64-bit Windows machine it asks for the location of the Java command (the JRE - the interpreter). Actually it seems to want the location of a JDK (compiler). If you give it the location of the JRE it gives you an error message about the JDK.
You nee to understand these points:
- as mentioned in the first thread, you need to use Java 1.6, not 1.7 or 1.8 (this was true when I posted this in August 2014). If you configure it to use a later JDK, you get a warning on start-up.
- As explained in the second thread (and as far as I can see, nowhere else) YOU NEED TO USE A 32-BIT VERSION OF THE JDK. You probably installed a 64-bit version and that won't do. You need to install the 32-bit version as well. This needs admin privilege. If you don't have that, you need to get your sys admin to do this for you.
- A JDK is installed in ora112\jdk when you install the Oracle tools, but this won't do for sqldeveloper (I suspect it's the 64-bit version.)
- As described in the first thread, you can configure the JDK by editing ora122\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf. This works and may be the only way to do it.
- To edit the configuration file, YOU NEED TO RUN YOUR TEXT EDITOR AS ADMINISTRATOR. This also needs administrator privilege,
- In my case, the correct setting was "SetJavaHome C:/oracle/java/jdk1.6.0_45_32bit", because that's where I installed my JDK.
By the way Oracle, you may not know this, but the 64-bit Intel computer running Windows is the most common workstation around right now. It shouldn't be this hard to configure a piece of software to run on it.
Simon