You could either use asadmin command "
create-jvm-option" or
"
create-system-properties" .
For example:
i) If you
want to set environment variables "ORACLE_HOME=/export/oracle" for the
appserver instance to refer. In appserver, it would use
"create-system-properties" command..
Sample syntax for the
command to add system property:
/opt/SUNWappserver/appserver/bin/asadmin create-system-properties
--user admin --passwordfile /tmp/adminpasswordfile --host localhost
--port 4849 --target your_server ORACLE_HOME=/export/oracle
ii) If you
want to set JVM option.
Sample syntax for the
command to add jvm option:
/opt/SUNWappserver/appserver/bin/asadmin create-jvm-options --user
admin --passwordfile /tmp/adminpasswordfile --host localhost --port
4849 --target your-server
\\-Dcom.sun.jndi.ldap.connect.pool.protocol="plain ssl"
a) create-jvm-option sets the
variable for the jvm. User would use this command to change
the heap size, profiler and other VM related options see:
http://java.sun.com/docs/hotspot/VMOptions.html
b) create-system-properties
sets the <system-property> element in the domain.xml. The
variable is also set in the vm but at a lower priority.
User can also set this to overwrite default values set in the config or
domain level.
If you need more detail on the variable on Glassfish or Application
Server please see the following URL:
http://docs.sun.com/app/docs/doc/819-2557/6n4rbnpba?a=view#abhau
for a more detailed descriptions between jvm-option and system-properties.