users@glassfish.java.net

Problems using environment variables for asenv.bat

From: <glassfish_at_javadesktop.org>
Date: Wed, 16 Apr 2008 04:58:13 PDT

Hi all.

I have installed Glassfish V2 Ur1. Trying to make the application server accessible for my Linux and Windows environment I have created environment variables holding the proper paths, which I tend to use for starting Glassfish.
Currently using windows I am facing the following problem:
I have created the environment variables which is set using the configuration settings (when using SET in msdos I can see that these are properly set):

SET DEV_HOME=D:\App
SET GLASSFISH_HOME=%DEV_HOME%\Server\Glassfish_2_1

The content of the ..\config\asenv.bat is the following:
rem
rem Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
rem Use is subject to license terms.
rem

set AS_ANT=%GLASSFISH_HOME%\lib\ant
set AS_ANT_LIB=%GLASSFISH_HOME%\lib\ant\lib
set AS_WEBSERVICES_LIB=%GLASSFISH_HOME%\lib
set AS_PERL=%PERL_HOME%
set AS_NSS=%GLASSFISH_HOME%\lib
set AS_NSS_BIN=%GLASSFISH_HOME%\lib\admincgi
set AS_IMQ_LIB=%GLASSFISH_HOME%\imq\lib
set AS_IMQ_BIN=%GLASSFISH_HOME%\imq\bin
set AS_CONFIG=%GLASSFISH_HOME%\config
set AS_INSTALL=%GLASSFISH_HOME%
set AS_JAVA=C:\App\App\sdk\sdk_5_3\jdk
set AS_ACC_CONFIG=%GLASSFISH_HOME%\domains\domain1\config\sun-acc.xml
set AS_JHELP=%GLASSFISH_HOME%\lib
set AS_ICU_LIB=%GLASSFISH_HOME%\lib
set AS_DEF_DOMAINS_PATH=%GLASSFISH_HOME%\domains
set AS_JDMK_HOME=%GLASSFISH_HOME%\lib\SUNWjdmk\5.1
set AS_NATIVE_LAUNCHER=false
set AS_NATIVE_LAUNCHER_LIB_PREFIX=\jre\bin\client
set AS_WEBCONSOLE_LIB=%GLASSFISH_HOME%\lib
set AS_JATO_LIB=%GLASSFISH_HOME%\lib
set AS_HADB=
set AS_DERBY_INSTALL=%GLASSFISH_HOME%\javadb
set AS_MFWK_HOME=%GLASSFISH_HOME%\lib\SUNWmfwk

Using these settings and running asadmin I get the following error:

C:\>asadmin start-domain domain1
C:\%GLASSFISH_HOME%\domains is not a directory
CLI156 Could not start the domain domain1.

However when I use the absolute paths in the asenv.bat file, everything works just fine.

Anyone any ideas on how to solve this (or is it a known issue)?

Kind regards,
Gijs Mollema
[Message sent by forum member 'teddor' (teddor)]

http://forums.java.net/jive/thread.jspa?messageID=269462