users@glassfish.java.net

Re: ${com.sun.aas.javaRoot} variable reference

From: Kedar Mhaswade <Kedar.Mhaswade_at_Sun.COM>
Date: Thu, 19 Mar 2009 06:15:46 -0700

Ludovic Champenois wrote:
> On 3/17/09 9:53 PM, Jerome Dochez wrote:
>> the easiest way to change the JDK location used by glassfish is to
>> modify the asenv.conf AS_JAVA variable.
> This will work, but you still need to have a JRE or JDK in your path for
> running the script asadmin that uses the 'java' command getting it from
> your environment/path, not from AS_JAVA ... So If you have nothing in
> your path, asadmin will still fail...(and all other commands: wsimport,
> wsgen, stopserv, jspc...as well) in the glassfish bin dir. Bug?

Well, it depends. If "installers" don't actually make sure
right Java is available for server and tools, then it's a bug.
But if you just get a "web.zip" or "glassfish.zip", you, as a user
must ensure that you have access to "java" in your Path.

> Ludo
>>> In the meantime I also introduced a JAVA_HOME environment variable
>>> (My Computer- Advanced- Environment Variable), pointing at my
>>> JDK-location. At first, this did not seem to work, but apparently it
>>> does now. So it is not much of a problem anymore, but still I would
>>> like to know how I can check the value of ${com.sun.aas.javaRoot} .

The theory behind AS_JAVA was to provide an installation wide
JAVA_HOME and refer to it by a token. So, the spirit was noble.
Now, you know that for one "installation" (i.e. set of "bits") there
is one asenv.conf[.bat]. But you can have multiple "domains" that utilize
the same installation. It may so happen that domain1 uses Java 1.6.0_01
and domain2 uses 1.6.0_05 (for this JDK update has fixed a bug that it needs).

To address such things, we decided:
- domain.xml -> <java-config> @ java-home is where you set the "overriding"
   JAVA_HOME
- the launcher piece of code would then carefully choose the "correct" or
   intended Java and also set this token "very early" in the startup to
   the right value, so that all the references to token are replaced
   correctly.

Sadly, some of this sane theory is defeated lately and we introduced lots of
options that ended up confusing users like you. I am hoping in the fullness
of time (September release), we will have a way in which we will answer
the question "Which Java is used by server???" without any ambiguity.

-Kedar


>>> [Message sent by forum member 'driesknottnerus' (driesknottnerus)]
>>>
>>> http://forums.java.net/jive/thread.jspa?messageID=337380
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>