[Bug 1217] New: Add command line arguments for plugins

bugzilla-daemon at icedtea.classpath.org bugzilla-daemon at icedtea.classpath.org
Tue Nov 13 13:32:24 PST 2012


http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1217

          Priority: P3
            Bug ID: 1217
                CC: unassigned at icedtea.classpath.org
          Assignee: dbhole at redhat.com
           Summary: Add command line arguments for plugins
          Severity: enhancement
    Classification: Unclassified
                OS: All
          Reporter: Martin.vGagern at gmx.net
          Hardware: all
            Status: NEW
           Version: hg
         Component: Plugin
           Product: IcedTea-Web

It would be great if there was a way to add command line arguments to the java
process the plugin viewer launches. Changing the memory limit would be
particularly useful. There are at least three possible sources where such a
setting might come from:

1. The environment:
According to
http://docs.oracle.com/javase/7/docs/webnotes/tsg/TSG-Desktop/html/plugin.html
the Oracle VM supports an environment variable called _JPI_VM_OPTIONS which may
be used to specify additional arguments for the applet process. As IcedTea-Web
already supports the ICEDTEAPLUGIN_DEBUG environment variable, adding another
variable should integrate nicely with the overall concept, and should not cause
additional security concerns.

2. Some config file:
The ControlPanel application from the Oracle VM provides a list of available
JREs, and will allow adding arguments for each of these. The settings entered
for the first JRE will end up in a file
~/.java/deployment/deployment.properties, associated with a key
deployment.javaws.jre.0.args. As
http://www.iced-tea.org/wiki/IcedTea-Web#Configuration mentions a file
~/icedtea/deployment.properties with similar content, support for such a
setting might be well placed in that location.

3. Applet parameters:
http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/applet/applet_deployment.html#JAVA_ARGUMENTS
describes a parameter called java_arguments which may be specified in the html
code of the page in order to pass specific arguments to the launched java
process. This feature obviously comes with a whole bunch of security concerns.
The document mentioned above gives some indications how the Oracle plugin deals
with these things. I see that the IcedTea-Web plugin already looks at this
parameter, but apparently it only extracts some few well-known values from it.
It doesn't pass the whole thing to the JVM process.

I had a look at the code,
http://icedtea.classpath.org/hg/icedtea-web/file/df7db8de4a20/plugin/icedteanp/IcedTeaNPPlugin.cc#l1647
in particular. Currently there appears to be no reasonable way to add arguments
at all. As the number of arguments is currently fixed at compile time, adding
an arbitrary number of space-separated arguments from any source would likely
require a bit of work, to make that whole command line array allocated
dynamically.

Cross reference: Before reporting this request for enhancement, I asked
http://stackoverflow.com/q/13361313/1468366 for possible solutions. That was
before I looked at the code, though, when I still believed there had to be some
way to configure this using the current code base.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121113/e64d8dc2/attachment.html 


More information about the distro-pkg-dev mailing list