Tuesday Jul 19, 2011

Specify which JVM GlassFish should use

With new releases of the JDK (updates to Java 6 or better yet, Java 7, more on that later) you may be tempted to upgrade the JVM used by GlassFish without changing your user or system settings.

Byron has a blog for you on How GlassFish picks up Java.

Original photo from http://commons.wikimedia.org/wiki/File:Aiguillage_EP01.jpg

His post covers starting GlassFish with the asadmin CLI and the order in which the appserver will consider JDK installations. My favorite way to specify a given JDK is the use of AS_JAVA in glassfish/config/asenv.conf (your mileage may vary). Check out the other possibilities.

Byron even has the links to the source code so that you can study the actual implementation (and who knows maybe improve it).