I am not using a cluster either, just standalone. I have a custom script which does the installation on my nodes. While I do typically install from the glassfish-4.0-unix.sh script with an answer file on a clean install, this is all that is in my .bashrc (and this all that is upgraded on a JDK upgrade):
export PATH=/opt/jdk1.7.0_25/bin:$PATH
export JAVA_HOME=/opt/jdk1.7.0_25
export GLASSFISH_HOME=/opt/glassfish4
and asenv.conf:
AS_IMQ_LIB="../../mq/lib"
AS_IMQ_BIN="../../mq/bin"
AS_CONFIG="../config"
AS_INSTALL=".."
AS_DEF_DOMAINS_PATH="../domains"
AS_DEF_NODES_PATH="../nodes"
AS_DERBY_INSTALL="../../javadb"
AS_JAVA=/opt/jdk1.7.0_25
/opt/glassfish4/glassfish/config/asenv.conf
Brian Wilkins
Software Engineer
Check out the new SW Reuse site: site/swreuse<
http://site/swreuse>
From: Zhang,Jun [mailto:JHZhang_at_mdanderson.org]
Sent: Monday, August 05, 2013 11:03 AM
To: 'users_at_glassfish.java.net'
Subject: RE: Do I need to reinstall glassfish to use a newer java version?
This is a standalone instance running on a node, which is controlled by a DAS host, no cluster in the picture. All processes are run as the glassfish user. The glassfish user at the DAS has JAVA_HOME updated to the new version in its .bash_profile, while the glassfish user at the node doesn't have JAVA_HOME set. asenv.conf file is found only at the DAS host and I updated the java version. In such a situation, I restarted the domain and the instance, the server.log shows still the old version of java. Before the change, the same old java version was used at both the host and the node/instance.
Is setting JAVA_HOME what I need to do at the node's glassfish user?
Jun
From: Wilkins, Brian [mailto:bwilkins_at_harris.com]
Sent: Monday, August 05, 2013 9:05 AM
To: 'users_at_glassfish.java.net'
Subject: RE: Do I need to reinstall glassfish to use a newer java version?
Yes, you'll need to modify asenv.conf (AS_JAVA=<location>) and potentially your .bashrc if you are using Linux to point to JAVA_HOME if it's not modified already.
From: Zhang,Jun [mailto:JHZhang_at_mdanderson.org]
Sent: Monday, August 05, 2013 10:02 AM
To: users_at_glassfish.javanet<mailto:users_at_glassfish.java.net>
Subject: Do I need to reinstall glassfish to use a newer java version?
When I installed glassfish, I used jdk_1.7.0_03. Now I want glassfish to use jdk_1.7.0_25, what kind of procedure should I take? Is making the newer version of java in the PATH for the glassfish user enough?
Thank you.
Jun