users@glassfish.java.net

Run GlassFish on JRE instead of JDK?

From: <glassfish_at_javadesktop.org>
Date: Mon, 05 Nov 2007 11:49:29 PST

I'm looking at re-distributing GlassFish with an application and want to bundle the
Java-runtime as well.
Bundling the JDK is not an option for licensing reasons (as I understand it).

I've got GlassFish up and running on an 1.5 JRE (tested with the GlassFish
quickstart hello.war) - but [b]the question is: are there known problems with this
setup?[/b]

I noticed this recent post on the theme:

http://forums.java.net/jive/thread.jspa?messageID=241549&#241549

so what I did was to:

1) patch my JRE with files from the JDK as mentioned in "Redistributable JDK(TM)
Files" in the http://java.sun.com/j2se/1.5.0/jre/README:

bin/javac.exe
lib/tools.jar
bin/apt.exe

2) update my glassfish-v2-b58c\config\asenv.bat with:

rem test with JRE only # set AS_JAVA=C:\opt\sun\jdk1.5.0_11\jre/..
set AS_JAVA=C:\opt\sun\jre1.5.0_11

rem test with JRE only # set AS_NATIVE_LAUNCHER_LIB_PREFIX=\jre\bin\client
set AS_NATIVE_LAUNCHER_LIB_PREFIX=\bin\client


Maybe I'm better off using a Java 6 JRE as in the previous post?

Another thing is that the Ant setup.xml script won't run unless tweaked (or ran with
a JDK) but that can be circumvented.


Thanks,
HÃ¥kan
[Message sent by forum member 'hdahl' (hdahl)]

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