Skip to main content

GlassFish install error on Windows 7

Please note these forums are being decommissioned and use the new and improved forums at
3 replies [Last post]
Joined: 2012-12-21

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- 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:
Or if you already have the required Java(TM) 2 Runtime Environment
installed, try rerunning this application with the following usage:
'ogs-' -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.
Joined: 2012-12-21

When I run in command prompt

ogs- -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.

Joined: 2013-01-01

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.

Joined: 2013-12-08

Thanks Jim
This command worked for me:

ogs- -j "C:\Program Files\Java\jre7"