Basit
Basit

Reputation: 8606

Java path error while installing glass fish 3.1.2

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

Thanks

Upvotes: 7

Views: 17570

Answers (6)

TheSagya
TheSagya

Reputation: 45

Fixed.

  • Java Version > Java v1.6
  • Open downloaded folder and select shift+right-click+open-command-window-here
  • Type exact file name of downloaded file -j and JRE path

in my case

  • ogs-3.1.2.2-windows.exe -j "c:\Java\jdk1.8.0_31\jre

Upvotes: 1

Krystian
Krystian

Reputation: 2290

In my case, the problem was a blank space in "Program Files" (Yes I have JAVA_HOME set) You can run installation from cmd with argumentation (do not forget quotation) -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"

Upvotes: 4

user2037079
user2037079

Reputation: 53

or just download a bundle package such as http://netbeans.org/downloads/ and click on the Java EE or ALL catagory

Upvotes: 0

user2037079
user2037079

Reputation: 53

  1. Open cmd make sure you cd to the path of you glassfish installation file :cd C:\Users\John\Downloads

  2. locate your jre file which should be in your jdk1.7x : C:\Program Files\Java\jdk1.7.0_11\jre

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

make sure you have the correct version

Upvotes: 5

Basit
Basit

Reputation: 8606

I didn't update the environment variable but i think path should be to JRE that is inside JDK like 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 will help others also.

Upvotes: 24

Pavan G
Pavan G

Reputation: 46

Try setting JAVA_HOME environment variable to the JDK root folder.

Upvotes: 0

Related Questions