users@glassfish.java.net

Re: How does one increase heap memory on the ACC?

From: <glassfish_at_javadesktop.org>
Date: Fri, 16 Jan 2009 08:53:07 PST

Thank you very much, you are a genius Tim! That is the perfect solution and gives good control over the client VM.

I did however have a problem implementing this....

using this url string:
http://localhost:8080/SomeProject/SomeProjectClient?vmarg=max-heap-size="512m"

I get an Application Error (Unable to launch the application)
Clicking on details yields: Error: Unexpected exception:
java.lang.ClassNotFoundException
        at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
        at com.sun.javaws.Launcher.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Take away the ?vmarg=max-heap-size="512m" and it launchs (but obviously without the 512m heap).

In the JNLP (Launch) File I noticed the following under the j2se tag (which I believe is what we are changing)
 j2se version="1.5+" java-vm=args="max-heap-size=512m"

I also tried
http://localhost:8080/SomeProject/SomeProjectClient?vmarg=-Xmx512m
which resulted in:
j2se version="1.5+" java-vm=args="-Xmx512m "

Looking at this I would think that it should be java-vm-args not java-vm=args (but perhaps I'm totally wrong?)
Something like:
<j2se version="1.5+" initial-heap-size="64m" max-heap-size="512m" />
or
<j2se version="1.5+" java-vm-args="-Xmx512m"/>


I'm sure I've done something wrong, perhaps someone has used the vmarg in the url string to pass VM arguments? Any examples? (I'm using glassfish v2ur2)

Thank you very much in advance, and keep up the good work Tim.
[Message sent by forum member 'enderfake' (enderfake)]

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