Reputation: 128827
I tried to follow The Java EE 6 Tutorial and start GlassFish with the command below. But I got an error message. How to solve this?
C:\glassfish3\bin>asadmin start-domain --verbose
The system cannot find the path specified.
Upvotes: 20
Views: 26740
Reputation: 2209
Set your correct Java path in:
<glassfish_home>\glassfish\config\osgi.properties
e.g.
set AS_JAVA=C:\Program Files\Java\jdk1.7.0_80
Note: follow Oracle glassfish's release notes for the supported JDKs
Upvotes: 0
Reputation: 128827
I fixed this issue by editing glassfish3\glassfish\config\asenv.bat
as described in domain1 not configured -- The system cannot find the path specified
then I got an error because no domains existed, that was solved by editing glassfish3\bin\asadmin.bat
as described in Oracle Glassfish "There is no Domain" Issue Fix Solution
Upvotes: 7
Reputation: 679
Hi I was facing the same issue. I am able to resolve the same issue by following below steps:
Go to \glassfish\config (Note: In my case it is c:\glassfish3\glassfish\config)
Now open asenv.bat in notepad.
Make the value of AS_JAVA same as JAVA_HOME environment variable.
Now open command prompt and go to the bin folder and run asadmin start-domain domain1.
If you are getting error that no domain exist then create new domain by following below link: http://docs.oracle.com/cd/E19776-01/820-4497/create-domain-1/index.html
Upvotes: 3
Reputation: 813
asenv.bat
file in config directoryset AS_JAVA="C:/Program Files(x86)/Java/"
asadmin
. It will work this time!.
Upvotes: 37
Reputation: 436
I got this error, when installing Java EE (which includes GlassFish) using 64 bit windows 7. As a reference installing same Java EE latest to my 64 bit Linux worked well and I could see how it set default domain up.
It seems that in my 64 bit Window 7 asadmin.bat looks my java from "C:\Program Files (x86)\Java\bin\java" even if I have installed 64 bit version in "C:\Program Files\Java\jdk1.7.0_10\bin".
asadmin.bat runs first "%~dp0..\glassfish\config\asenv.bat" and then studies where if guesses java is. There is something odd in this, almost in my configuration, but I can't fix this nicely
%JAVA% -jar "%~dp0..\glassfish\modules\admin-cli.jar" %*
I could manually set %JAVA% right, but how to set nicer correction?
Upvotes: 0