Java path error when installing glass fish 3.1.2

I installed the JDK 7 5 (64 bit) update on my server (the server has 64-bit Windows OS). Set the path to the environment. When I do java -version . I get the output of java version 1.7_0_05 , but when I try to install glass fish, I get the error message This application needs version 1.6 or higher of the Java (TM)2 Runtime Environment . I installed the JDK bin folder and the JRE bin folder on my environment path. Why am I getting this?

thanks

+4
source share
5 answers

I did not update the environment variable, but I think the path should be in the JRE, which is inside the JDK, as I tried this, and it worked

D:\Basit>ogs-3.1.2-windows.exe -j "c:\Program Files\Java\jdk1.7.0_05\jre" .

Hope this answer helps others as well.

+19
source
  • Open cmd, make sure that you are connected to the path to the Glassfish installation file: cd C: \ Users \ John \ Downloads

  • find the jre file that should be in your jdk1.7x: C: \ Program Files \ Java \ jdk1.7.0_11 \ jre

  • In the cmd folder: glassfish-3.1.2.2-windows.exe -j "C: \ Program Files \ Java \ jdk1.7.0_11 \ jre"

make sure you have the correct version

+4
source

In my case, the problem was the empty space in the "Program Files" (Yes, I have JAVA_HOME set). You can start the installation from cmd with arguments (do not forget the quote) -j "c: /.../ java path" Example from my case:

c: \ Users \ Kryst \ Downloads> glassfish-4.0-web-windows.exe -j "C: \ Program Files \ Java \ jdk1.7.0_ 79 \ jre"

+4
source

Try setting the JAVA_HOME environment variable to the JDK root folder.

0
source

or just download the batch package, for example http://netbeans.org/downloads/ and click on the Java EE or ALL link

0
source

All Articles