Skip to main content

GlassFish install error on Windows 7

3 replies [Last post]
anthonymcinnis
Offline
Joined: 2012-12-21
Points: 0

I have install SE 1.6 and set env variables for my path and also JAVA_HOME however when I try to install GlassFish exe ogs-3.1.2.2-windows I get the long error message below:

This application needs version 1.6 or higher of the Java(TM) 2 Runtime
Environment. If the required Java(TM) 2 Runtime Environment is not installed,
you can download it from the following website:
http://java.sun.com/j2se
Or if you already have the required Java(TM) 2 Runtime Environment
installed, try rerunning this application with the following usage:
'ogs-3.1.2.2-windows.exe' -j

Below is my path:
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\ant\bin;C:\Program Files\Java\jre6;C:\Program Files\Java\jdk1.6.0_38

Below is my JAVA_HOME:
C:\Program Files\Java\jre6 Using jdk1.6.0_38 also gets the same error.

Can someone please help me get past this road block ?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
anthonymcinnis
Offline
Joined: 2012-12-21
Points: 0

When I run in command prompt

ogs-3.1.2.2-windows.exe -j C:\Program Files\Java\jdk1.6.0_38 (or jre6)

I get

Error: 'Files\Java\jdk1.6.0_38' is not a valid argument.

I beleive this is due to the -j parameter not being able to handle Windows 2 word folder names.

Dev_Jim
Offline
Joined: 2013-01-01
Points: 0

You are correct. Java comes from the Unix world, where there are no spaces allowed in file names. To get around this, you can help DOS to speak to java by putting all or part of your file path in double quotes. If this fails use single quotes. You will notice that if you navigate in dos to a place like program files, when you type pro then press tab for autocomplete the response will have double quotes to allow for the space in the name.

drormik
Offline
Joined: 2013-12-08
Points: 0

Thanks Jim
This command worked for me:

ogs-3.1.2.2-windows.exe -j "C:\Program Files\Java\jre7"