SQL Developer – Cannot find a Java SE SDK installed at path

Background

Back in 2011, 5 years ago now, I posted about an error message I was experiencing.

The error message reads “Oracle – 11G – Client – SQL Developer (64-bit) – Error – WARNING: Could not find jvm.cfg!”. And, it is available here.

 

Last Week

In the last week I have received a couple of comments around that post and the comments were a nice “It does not work“.

As busy with other stuff could not really quite get to it, but had a bit of down time today.  And, so here we go.

Downloaded

Version

Downloaded the latest version of SQL Developer from http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html/

The version # is …

SQL Developer 4.1.3
Version 4.1.3.20.78, Updated December 22, 2015

Available Media

Our OS is a 64-bit Windows, specifically MS Windows 7 x64.

AvailFiles

 

Downloaded Media

media

  1. No-JRE
  2. x64

As we have a 64-bit OS, the easiest and best file is Window 64-bit win JDK 8 included.

But, to make things interesting and address the specific error we chose the Windows 32/64-bit.

Extracted

Extracted the compressed file.

Packages Comparison

Once we extracted the compressed files, we ran a folder comparison tool against the extracted folders.

WinMerge

WinMerge_20160831_0108AM

Results of Comparison

From comparing the folder, we see that the version that has JDK bundled has a JDK folder.

Presumably under the JDK folder, we have the JDK files.

 

Bundled Install

Configuration

File Relative Path

How is the bundled install handled in terms of the in-built Java JDK?

Traditionally the location where the Java JDK should be found is designated in the sqldeveloper.conf file.

From the base home of SQL Developer, the relative path is sqldeveloper\sqldeveloper\bin.

 

Contents

sqldeveloper

We can set that SetJavaHome is set to ../../jdk

 

Where is ../../jdk?

WhereIsJDK

 

StandAlone Install

Download and install Java JDK

Available Media

Download JDK from here.

For sake of comparison we chose to download both the 32 and 64 bit files for Windows.

JavaSEDevelopment

Files

  1. 64-bit
    • jdk-8u102-windows-x64.exe
  2. 32-bit
    • jdk-8u102-windows-i586.exe

Install

We installed unto a drive other than our system drive.

Trials

Here are a steps of trials we undertook to answer the question ( Please Specify the Path to the Java JDK home )

 

  1. Trial 1
    • JRE – 32 bit
      • D:\Program files (x86)\Java\jre1.8.0_120
      • Errors
        • Cannot find jre\bin\java.exe
  2. Trial 2
    • JDK – 64 bit
      • D:\Program Files\Java\jdk1.8.0_102
      • Errors
        • Cannot find lib\tools.jar
  3. Trial 3
    • JDK – 32 bit
      • D:\Program Files (x86)\Java\jdk1.8.0_102\
    • Errors
      • ( None )

Trial 1- D:\Program Files (x86)\Java\jre1.8.0_102

Please Specify the Path to the Java JDK home

PleaseSpecifyThePath

Path Entered – Java JRE  ( D:\Program Files (x86)\Java\jre1.8.0_102 )

PleaseSpecifyThePath_JREHome

 

Error – Cannot find a Java SE SDK installed at path : <HOME> – D:\Program Files (x86)\Java\jre1.8.0_102

CannotFindJavaSESDKInstalledAtPath

 

SysInternals

SI-20160830-0801PM

When we capture via SysInternals, we will see that SD searched for D:\Program Files (x86)\Java\jre1.8.0_102\jre\bin\java.exe.

And, so from D:\Program Files (x86)\Java\jre1.8.0_102 we get D:\Program Files (x86)\Java\jre1.8.0_102\jre\bin\java.exe

Not a logic god, but it seems that SD adds the jre\bin and looks for java.exe (  relative file name jre\bin\java.exe)

 

Trial 2 – 64 Bit – Java JDK ( D:\Program Files\Java\jdk1.8.0_102 )

Specify Path

SpecifyPathAfter

Error Message – Cannot find a Java SE SDK installed at path

ErrorMessage

SysInternals

SysInternals-20160830-0812PM

Folder

Checked D:\Program Files\Java\jdk1.8.0_102\lib

CannotFindTools-Jar

…. but no tools.jar

 

 

Trial 3 – 32 Bit – Java JDK ( D:\Program Files (x86)\Java\jdk1.8.0_102 )

Specify The Path

SpecifyThePath

 

Splash Screen

SplashScreen

SysInternals

SI-20160830-0819PM

 

Configuration

Configuration is saved in C:\Users\<user>\AppData\Roaming\sqldeveloper\<version>

For me, C:\Users\daniel.adeniji\AppData\Roaming\sqldeveloper\4.1.3

Explorer View

Configuration-folder

File Contents

product-conf-contents

 

One is able to go and edit the product.conf file.

Part of the customization is to set the JavaHome.

 

JDK Versioning

It is foundationally good to determine the bitness of Java JDK you have installed.

Internet Help

Took to the Net to find out that best way to determine the bitness of the JDK we have installed.

Best and most accessible help came from Coderwall and it is available here.

Commands Syntax

The available options are:

  1. java -version
  2. java -d64 version

java -version

Sample

java -version

java -d64 version

What is -d64 ?

Link

WhatIs-d64

Sample

java -d64 version

Results Matrix

Product Version File Version
 JRE Bundled (x64)
java -version  java version “1.8.0_60”
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
 java -d64 version  java version “1.8.0_60”
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
64-bit JDK installed separately
 java -version  java version “1.8.0_102”
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
 java -d64 version  java version “1.8.0_102”
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
32-bit JDK installed separately
  java -version java version “1.8.0_102”
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) Client VM (build 25.102-b14, mixed mode)
 Error: This Java instance does not support a 64-bit JVM.
Please install the desired version.

 

 

 

SysInternals – Process Monitor

Launched SysInternal’s Process Monitor.

And, filtered for:

  1. Process name is sqldeveloper.exe

 

ProcessMonitorFilter

Summary

SysInternal’s Process Monitor is very helpful to trace application errors.

Back in 2014, Jiji Sasidharan posted that Oracle changed the folder where configuration for SQL Developer is saved.

This change is effectual with SQL Developer v4+.

Again, it is likely more expedient to go with the version, “Windows 64 bit with JDK included”.

Please do not overlook the fact that your machine and OS has to be 64-bit.

For those lagging with computer or OS, please continue to choose the separate bundles.

 

References

SQL Developer – Configuration

  1. Oracle SQL Developer – How to change Java SDK?
    Link

Application Data

  1. Accessing “Application Data” in Windows 7
    Link

 

2 thoughts on “SQL Developer – Cannot find a Java SE SDK installed at path

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s