Link to home
Start Free TrialLog in
Avatar of chalie001
chalie001

asked on

could not find the required version of the Java(TM) 2 runtime environment in (null)

hi am having this error when trying to install my java jdk am in window 7
javaerror12.PNG
Avatar of David Favor
David Favor
Flag of United States of America image

Likely whatever application you're running requires either a higher or lower version of Java to run.

Since you're trying to install Java... Mention site where you downloaded your Java installer...

http://www.oracle.com/technetwork/java/index.html is the only place I'd ever download a Java installer.

If you have problems with an Oracle installer, open a bug ticket with them.

Also, since Oracle acquired Java from Sun (years ago), I've never had a single Java install failure on any OS, so likely your installer can from a questionable source or is corrupt.

You might also try downloading a slightly higher or lower installer + if this 2nd installer works, be sure to include that information in your Oracle bug ticket.
Avatar of chalie001
chalie001

ASKER

i got it from oracle.com
Very odd.

https://stackoverflow.com/questions/22639865/how-to-fix-error-could-not-find-the-required-version-of-the-javatm-2-runtime describes how some people fix this.

Likely this will be the only way to fix the problem, as the problem actually seems to relate to your current installed version of Java being somehow corrupt.
Please go to the command line (cmd.exe) and do

where java

Open in new window


Please paste the output here
User generated image  check
Well, you've done more than i asked for and as a result, have proved that Java runs correctly. How are you producing, therefore, that error dialog you showed?
I what to install GlassFish
Not sure what the dependencies are for that - do you need a JDK?
yes
https://docs.oracle.com/cd/E26576_01/doc.312/e24935/installing.htm#GSING00022

Before installing Oracle GlassFish Server 3.1.2, ensure that your system meets the requirements listed in "Hardware and Software Requirements" in Oracle GlassFish Server Release Notes. If necessary, download and install the required JDK software.

You only have a JRE
I'd git rid of the JRE. It's out of date anyway
I have jdk
1. 8
Oh sorry. Can you do

where javac

Open in new window

?
checkUser generated image check
Doesn't look like you have a JDK then. Install JDK 9
I do have can I show I my path
I do have can I show I my path
If it were in the PATH, where javac should have shown it. But to double-check:
echo %PATH%

Open in new window

User generated image check
Can you please do that again, but copy and paste from cmd.exe (hint: turning on quick edit in properties i find helps)
That PATH needs work. It's partly broken
In fact, you can start by uninstalling all java that you don't have a good reason for keeping. We can then start afresh
check
C:\Users\rdp>echO %PATH%
C:\javajdk8\bin;C:\javajdk8;C:\Program Files\Java\jre1.8.0_151;C:\Program Files\Java\jre1.8.0_151\bin;C:\app\oracle\product\12.1.0\dbhome_1;
C:\app\oracle\product\12.1.0\dbhome_1\BIN;C:\Oracle\Middleware\FRHome\bin;C:\app\oracle\product\12.1.0\dbhome_1\bin;C:\java5\bin;C:\Windows\
system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\oracle\Middleware\forms;C:\oracle\Middleware\bin
;C:\Oracle\Middleware\FRHome\opmn\bin;C:\Oracle\Middleware\FRHome\opmn\lib;C:\Oracle\Middleware\FRHome\perl\bin;C:\jre\bin;C:\app\oracle\jdk
;C:\Program Files\PuTTY\;C:\WATCOM\BINNT;C:\WATCOM\BINW;C:\Program Files\Java\jdk1.7.0_51\bin;C:\Oracle\Middleware\FRHome\BIN
C:\javajdk8\bin
C:\javajdk8
C:\Program Files\Java\jre1.8.0_151
C:\Program Files\Java\jre1.8.0_151\bin
C:\app\oracle\product\12.1.0\dbhome_1
C:\app\oracle\product\12.1.0\dbhome_1\BIN
C:\Oracle\Middleware\FRHome\bin
C:\app\oracle\product\12.1.0\dbhome_1\bin
C:\java5\bin
C:\Windows\
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\oracle\Middleware\forms
C:\oracle\Middleware\bin
C:\Oracle\Middleware\FRHome\opmn\bin
C:\Oracle\Middleware\FRHome\opmn\lib
C:\Oracle\Middleware\FRHome\perl\bin
C:\jre\bin
C:\app\oracle\jdk
C:\Program Files\PuTTY\
C:\WATCOM\BINNT
C:\WATCOM\BINW
C:\Program Files\Java\jdk1.7.0_51\bin
C:\Oracle\Middleware\FRHome\BIN 

Open in new window

Basically anything above with JDK in it without bin it is already wrong.
See my last comment.

I'd do this:

a. Uninstall all Java
b. Install latest JDK
c. Set JAVA_HOME to its installation directory
d. Install Glassfish
am still not able to install glassfish i reinstall all java
User generated image
Please open a new cmd.exe. Then just as a check, run the first command, add the second command if the first 'works' and then the third (and note there the difference from what you did before)

dir C:\java8jdk\bin\javac.exe
set JAVA_HOME=C:\java8jdk
set PATH=%JAVA_HOME%\bin;%PATH%

Open in new window


Once you've done that, you can try to run the installer
is still the same
User generated image
Why are you trying to install a version 7 EE sdk with a version 8 jdk?

btw if all you want to do is run Glassfish, all you need to do is unzip the zip file version and run it with the batch file in the bin directory. No installation as such is necessary
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.