RFC: Netx - Support VM arguments specified in the JNLP file
Omair Majid
omajid at redhat.com
Wed Jun 3 10:41:03 PDT 2009
Deepak Bhole wrote:
> * Omair Majid <omajid at redhat.com> [2009-06-01 17:03]:
>> Hi,
>>
>> The attached patch allows Netx to use the JVM arguments specified in the
>> JNLP file. Currently only 'initial-heap-size', 'max-heap-size' and
>> 'java-vm-args' are used.
>>
>> The first instance of the JVM parses the JNLP file and creates a new JVM
>> with the required arguments if the JNLP file requires it. The option
>> '-Xnofork' is passed to Netx to indicate it shouldnt fork any more JVMs.
>> This also makes it possible to revert to the old behaviour by passing
>> -Xnofork to the first instance of Netx.
>>
>
> Xnofork is fine, but it doesn't look like the other args (that javaws
> accepts) will get passed to the new vm instance... those should be
> inherited as well.
Doh. Updated patch attached.
ChangeLog:
2009-06-03 Omair Majid <omajid at redhat.com>
* rt/net/sourceforge/jnlp/JNLPFile.java
(needsNewJVM): New function. Returns true if the JNLP file requires
creating a new JVM.
(getNewVMArgs): New function. Returns arguments to pass to the new
JVM.
* rt/net/sourceforge/jnlp/Launcher.java
(launchExternal): Modify to take in arguments to pass to the JVM and
arguments to pass to the Java program. Use the local file used to
launch this instance if possible.
(launchExternal): Modify to take in arguments to pass to the JVM and
arguments to pass to the Java program. Launch Netx with the with the
appropriate arguments.
(launchApplication): If needed, launch a new JVM and pass along the
Netx arguments.
* rt/net/sourceforge/jnlp/resources/Messages.properties:
Add BXnofork.
* rt/net/sourceforge/jnlp/runtime/Boot/java:
Add -Xnofork to helpMessage
(main): Check for '-Xnofork'. Set initial arguments.
* rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java:
Add forksAllowed to store whether creating a new JVM is allowed. Add
initialArguments to store the arguments to Netx.
(getForksAllowed): New function. Check if creating a new JVM is
allowed.
(setForksAllowed): New function. Set whether creating a JVM is
allowed.
(setInitialArguments): New function. Store the arguments to Netx.
(getInitialArguments): New function. Return the arguments passed to
Netx.
* rt/net/sourceforge/jnlp/services/XBasicService.java
(showDocument): Fix call to launchExternal to match the new
semantics.
Cheers,
Omair
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netx-jvm-args.patch
Type: text/x-patch
Size: 11870 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090603/034ebc47/netx-jvm-args.patch
More information about the distro-pkg-dev
mailing list