45

Error image

It's showing -

This installer must be executed using a Java Development Kit (JDK)
but C:\Program Files\Java\jre7 is not a valid JDK.

</>- while installing the WebLogic server.

I have installed the 64-bit JDK version 1.7. Where am I making a mistake?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
user2866685
  • 461
  • 1
  • 4
  • 3

19 Answers19

95

i faced the same problem even when JAVA_HOME points to JDK this is how i resolved it ,

  1. run command prompt as administrator

  2. go to the directory which contains your jar file

    C:\Windows\system32>cd/
    
    C:\>cd oracleweblogic
    
  3. Set JAVA_HOME and path again on the command prompt

    //put path in double quotes otherwise it won't recognize variable

    C:\oracleweblogic>set JAVA_HOME="C:\Program Files\Java\jdk1.8.0_45"
    
    C:\oracleweblogic>set path=C:\Program Files\Java\jdk1.8.0_45\bin;%path%
    

    If you have already set the JAVA_HOME then in the second step you can also type as: C:\oracleweblogic>set path=%JAVA_HOME%\bin;%path%

  4. run the jar file

    C:\oracleweblogic>java -jar fmw_12.2.1.1.0_wls_quick.jar
    

you should see something like this if your setup is correct

C:\oracleweblogic>java -jar fmw_12.2.1.1.0_wls_quick.jar
Launcher log file is C:\Users\ANANT\AppData\Local\Temp\OraInstall2016-10-06_12-4
6-22PM\launcher2016-10-06_12-46-22PM.log.
Extracting the installer . . . . . . . . . . . . . . . . . . . . . . . . . . . .
 . . . . . . . . . . . . . Done
Checking if CPU speed is above 300 MHz.   Actual 1696    Passed
Checking swap space: must be greater than 512 MB    Passed
Checking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit n
ot required)
Checking temp space: must be greater than 300 MB.   Actual 42253 MB    Passed


Preparing to launch the Oracle Universal Installer from C:\Users\ANANT\AppData\L
ocal\Temp\OraInstall2016-10-06_12-46-22PM
Log: C:\Users\ANANT\AppData\Local\Temp\OraInstall2016-10-06_12-46-22PM\install20
16-10-06_12-46-22PM.log

*****************************************************


Distribution Name : Oracle Fusion Middleware 12c WebLogic and Coherence Develope
r
Distribution Version : 12.2.1.1.0

Oracle Home : C:\oracleweblogic\wls12210
Java Home : C:\Program Files\Java\jdk1.8.0_45

Note: Oracle Home not supplied (defaulted to <present working dir>\wls12210)

*****************************************************

Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
Skipping Software Updates
Starting check : CertifiedVersions
Expected result: One of 6.1,6.2,6.3,10.0
Actual Result: 6.3
Check complete. The overall result of this check is: Passed
CertifiedVersions Check: Success.
raikumardipak
  • 1,461
  • 2
  • 29
  • 49
Sam2016
  • 1,014
  • 7
  • 13
  • It wasn't recognizing the environment variables I had set pointing to the JDK folder but manually setting them before running the jar solved my issue. Thanks! – Pat Migliaccio Dec 12 '16 at 20:57
  • The command `set path=C:\Program Files\Java\jdk1.8.0_45\bin;%path%` should use `"` to specify the path like `set path="C:\Program Files\Java\jdk1.8.0_45\bin;%path%"` – lealceldeiro Oct 22 '19 at 08:21
30

Though this is an old thread, but still, I want to share how I resolved this issue because I wasn't able to find appropriate answer for this issue

My Observation: Go to Control Panel -> Java -> View -> Here you can find all the JRE installed on you're system. As expected, when we update our jre, it is selected by default to run any java application.

On my system, I have installed jdk1.8.0_73 but it still was giving error for jre1.8.0_91. I checked for the jre updates and found that, this was the most updated JRE on my system. So, I uninstalled jre1.8.0_91 expecting that it now pick up the installed JDK jre of my system. But now it was giving error for jre1.8.0_73.

I double checked by JDK_HOME,JAVA_HOME and PATH variable and all were pointing to jdk1.8.0_73

Resolution :

So to resolve this issue, instead of running the command like

java -jar fmw_12.2.1.1.0_wls.jar, I ran it as

"C:\Program Files\Java\jdk1.8.0_73\bin\javaw.exe" -jar fmw_12.2.1.1.0_wls.jar"

and the issue got resolved

More information about this can be found here

Ashishkumar Singh
  • 3,580
  • 1
  • 23
  • 41
7

You can install it by giving the full path:

C:\Program Files\Java\jdk1.8.0_131\bin\java" -jar fmw_12.2.1.2.0_wls.jar
Pang
  • 9,564
  • 146
  • 81
  • 122
3

You have to set the variable JAVA_HOME, but also add the jdk bin folder to the PATH variable. (type in the console window you use to start the weblogic installer)

It should look similiar to this example:

set JAVA_HOME=C:\develop\jdk1.8.0_66
set path=C:\develop\jdk1.8.0_66\bin;%path%
Slettal
  • 1,007
  • 13
  • 19
  • 2
    Exactly my problem. On Windows 10, I upgraded Java8 in the meantime, installer placed path `c:\ProgramData\Oracle\Java\javapath` to java symlinks at the very beginning of PATH. – Tomáš Záluský Aug 16 '16 at 10:42
3

I understand this thread is little old, but I faced similar issue today while installing weblogic server and wanted to give my observation and resolution.

If you have installed any oracle product or java, the first value in the environment variable PATH refers to "C:\ProgramData\Oracle\Java\javapath" which points to the JRE.

To override this setting, I just added %JAVA_HOME%\bin; at the beginning of the path variable and after restarting the command prompt, it started picking up JDK instead of JRE.

I hope this helps someone who is looking for an alternative solution.

Dwarrior
  • 687
  • 2
  • 10
  • 26
  • thanks! I just edited the Path variable, create the new key "%JAVA_HOME%\bin" and move it up, that's it! – JohnPan Apr 24 '23 at 08:33
2

The JRE is the Java Runtime Environment - what is needed just to run "regular" Java software. It's part of the JDK, but not the complete package. The JDK includes the JRE plus developer tools e.g. the Java Compiler. Weblogic's installer apparently needs the full JDK, not only the JRE.

If you installed the JDK, you should be able to find it on your hard drive (e.g. C:\Program Files\Java\jdk1.7_<something>). The path in your screenshot is only the "raw" JRE.

Ray
  • 3,084
  • 2
  • 19
  • 27
  • 2
    I have installed full JDK and also have set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_45, but still it is taking :\Program Files\Java\jre1.6.0_45 – user2866685 May 03 '16 at 19:06
1

For Linux when you download the JDK using http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html.

Goto Run > Debug > Debug (Edit configuration) > Default > TestNG > JRE (set up the location where you have downloaded the file)

Saurav Jha
  • 31
  • 3
1
  • Go to JDK folder
  • Run like this:
E:\wlinstallnfile\fmw_12.2.1.3.0_wls_Disk1_1of1>"E:\ATG\software\Java\jdk1.8.0_201\bin\javaw.exe" -jar fmw_12.2.1.3.0_wls.jar**
TheChubbyPanda
  • 1,721
  • 2
  • 16
  • 37
1

The issue is due to the java is pointing to JRE instead of JDK

Execute the java from the JDK folder like below:

c:\Program Files\Java\jdk1.8.0_60\bin\java.exe” -jar “<FILENAME>.jar”
0

You must provide the correct path to your JDK (not the JRE) in the system variable JDK_HOME.

You could also change the JAVA_HOME variable to point at your installed JDK.

Your PATH system variable should also use the correct path to the JDK, and it would be useful if you could provide the result of the command: java -version.

Have a look also here: https://docs.oracle.com/cd/E24329_01/doc.1211/e24492/console.htm#WLSIG128

sanastasiadis
  • 1,182
  • 1
  • 15
  • 23
0

It worked for me after I used this line:

Downloaded fmw_12.2.1.1.0_wls_quick_Disk1_1of1 and extracted to C:\Softwares\OracleFustionMiddleware and then from command prompt

C:\softwares\OracleFusionMiddleware>"C:\Program Files\Java\jdk1.8.0_91\bin\java. exe" -jar fmw_12.2.1.1.0_wls_quick.jar

0

I had same problem. I had JAVA_HOME variable set to 'C:\Program Files\Java\jdk1.8.0_25' and Path variable set to 'C:\Program Files\Java\jdk1.8.0_25\bin'. Even after checking, it was giving me the same error. But then I changed order of the Path variable. I set it to "C:\Program Files\Java\jdk1.8.0_25\bin;C:\ProgramData\Oracle\Java\javapath;C:\oraclexe\app\oracle\product\11.2.0\server\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem" keeping path of jdk bin at the first place. It solved the issue.

Manisha Nagpal
  • 163
  • 1
  • 1
  • 10
0

for me , I went to the folder that contains the jdk (C:/program files/java/jdk_1_8_161/bin) and typed (java -jar "the/path/of/the/soasuite") ... now it worked ... by the way the JAVA_HOME is set correctly but not used donno why

osama yaccoub
  • 1,884
  • 2
  • 17
  • 47
0

this is the solution. Specify temp directory having more space like the following example.

java -Djava.io.tmpdir=C:\Temp -jar fmw_infra_121200.jar

0

On your System Properties - Environment Variable, on Path, please check that any JRE path would be located first before the actual JDK path which might be present at the bottom.

In my case, Oracle JRE path was mentioned first, then the JDK later. I just moved up the jdk path above the JRE one and it worked charm.

Srini M
  • 495
  • 2
  • 9
0

step 1: C:\Windows\system32>cd %JAVA_HOME%

setp 2: C:\Program Files\Java\jdk1.8.0_201\bin>java -jar E:\PMLaptrinh\WebLogic\fmw_12.2.1.3.0_wls.jar

100% run successful.

Nguyen Duc Hai
  • 301
  • 2
  • 3
0

1)open command prompt 2)go to jdk bin folder

3)run java -jar E:\PMLaptrinh\WebLogic\fmw_12.2.1.3.0_wls.jar

It worked for me

0

C:\Program Files\Java\jdk1.8.0_231\bin>java -jar C:\Users\TESTING\Desktop\DB\V983368-01\fmw_12.2.1.4.0_infrastructure.jar

it worked successfully

SRS
  • 1
-1

Problems

  1. You can't run as admin
  2. You launch command prompt and it confuse the Java home
  3. You've done lots with settings but can't fix it

Solutions

  1. Uninstall JAVA completely.
  2. Uninstall JAVA again, this time unselect JRE.
  3. Launch command prompt and run the JAR setup file
Newd
  • 2,174
  • 2
  • 17
  • 31