• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error: Could not find the required version of the Java(TM) 2 Runtime Environment in '(null)'

 
Ranch Hand
Posts: 150
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have installed and tested j2se jdk8 u5 on my Windows 7 64 bit laptop and successfully tested in Eclipse with a quick Hello World.

JAVA_HOME = C:\Program Files\Java\jdk1.6.0_25

When I try to install j2ee jdk7 sdk7 I get

Error: Could not find the required version of the Java(TM) 2 Runtime Environment in '(null)'

Can someone please tell me what I have missed?

Thanks,

Lou
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Get to a command line and type:

>where java

You may find that there is a java in a folder like C:\Windows\System that gets looked at before the java in your path.

Also, why do you have JAVA_HOME pointing to 1.6?
 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When do you get this message, eg during installation, when compiling your code from the command line/ Eclipse, when running the code etc
 
Lou Pelagalli
Ranch Hand
Posts: 150
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
During installation.
 
Lou Pelagalli
Ranch Hand
Posts: 150
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Knute,

I think you're on to something.

Here's the result after changing the path variable.

C:\Users\Owner>where java
C:\Program Files\Java\jre8\bin\java.exe
C:\Windows\System32\java.exe

C:\Users\Owner>

I noticed that I actually have two path variables, one Environment and the other System. Apparently the System variable is use first because when I first moved it from Environment it still showed up in Windows/System32, so I moved it again to the first variable in System Path.

I am going to uninstall everything I installed and start over. I don't know what to do about C:\Windows\System32\java.exe.

Thanks,

Lou
 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
C:\Windows\System32\java.exe is only a problem if it is first in the path. It seems yours is not, so put the correct java.exe in the PATH (which I assume you did).

If you do have to deal with C:\Windows\System32\java.exe, maybe because C:\Windows\System32\ has to be first in the PATH, then you can copy whichever version of java.exe you want on top of the one in the system32 folder.
 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By two PATHs do you mean one for the system and one for the User? You can get all sorts of weird errors if the PATH isn't set up just right.
You should usually put your Java installation folder at the beginning of the PATH variable. I do not know whether the whole system PATH is explored before the user PATH. Try this instruction and see which appears first:-
echo %PATH%
Another few things to try at the command line:-
set PATH="C:\Program Files\Java\jre8\bin\"
I do not know whether the quotes are absolutely essential, but you can confuse the command line if you have spaces in the argument. That instruction resets the PATH, but only for the instance of command prompt which it was set from.
C:\Program Files\Java\jre8\bin\java -version [Might need "" again: don't know. Or any other suitable instruction after java]
That uses the absolute PATH to java just for the current instruction.

Repeat the procedure for the javac tool. It is important that the javac tool not be a newer version than the java tool, otherwise you can get failure to execute.
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
J2EE? I never noticed you were installing that.

You need to have a Java SE (=standard edition) JDK installed before installing Java EE. I think Java EE is its current name. I found a tutorial here, and I am sure you have already seen the installation instructions for Java EE.
It says a JDK is required, so you can't simply use a pre‑existing JRE. There are combined downloads here, but that is JDK7u45, so you are probably better getting the 7u60 version of the JavaSE JDK and installing that with Java EE later.
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And now I see that you already have JDK8u5. So you can ignore most of what I said!
 
Lou Pelagalli
Ranch Hand
Posts: 150
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Knute,

I still get the same message when installing java_ee_sdk-7-jdk7-windows-x64.exe.

First I uninstalled j2ee and j2se.

Then I installed jdk-8u5-windows-x64.exe

Next I set up my environment variables

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Owner>ECHO %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_05

C:\Users\Owner>WHERE JAVA
C:\Program Files\Java\jdk1.8.0_05\bin\java.exe

C:\Users\Owner>

Successfully tested Hello World with Eclipse.

Then tried to install java_ee_sdk-7-jdk7-windows-x64.exe.
and got the same message
Error: Could not find the required version of the Java(TM) 2 Runtime Environment in '(null)'

Why would it think the JRE is null?

Thanks,

Lou
 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think you can install that file with a JRE version 8. Try installing (or pointing your path to) version 7.
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you get from echo %PATH% and java -version and javac -version?
 
Tony Docherty
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:And now I see that you already have JDK8u5. So you can ignore most of what I said!


You may be on to something. The OP is trying to install J2EE version 7 so it may not accept the currently installed JDK as it's version 8.
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think JavaEE7 is the most recent edition. What OP hasn't told us is that he has confirmed his PATH with the -version tests.
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tony Docherty wrote:

Campbell Ritchie wrote:And now I see that you already have JDK8u5. So you can ignore most of what I said!


You may be on to something. The OP is trying to install J2EE version 7 so it may not accept the currently installed JDK as it's version 8.


Yes you can. That's the way I've got my system set up.
I suspect the problem may be the JAVA_HOME setting. The installation is looking for a JRE not the JDK.
Try running the installation from a command prompt with the command
java_ee_sdk-7-jdk7-windows-x64.exe -j <path to JRE>
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually I just noticed you are trying to install the combined EE and SE JDKs, but you said in your original post that you already had JEE8 JDK installed. So you only need to install the Java EE JDK now.
Try downloading the JEE7 JDK only install program and see if that works any better.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic