“The system cannot find the path specified.” error message when trying to start GlassFish with asadmin

StackOverflow https://stackoverflow.com/questions/12956167

  •  08-07-2021
  •  | 
  •  

문제

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.
도움이 되었습니까?

해결책 2

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

다른 팁

  1. Go to asenv.bat file in config directory
  2. remove line set AS_JAVA="C:/Program Files(x86)/Java/"
  3. retry asadmin.

It will work this time!.

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

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?

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top