JDK-6646674 : Add mechanism for ignoring unrecognized command-line arguments with standard Java launcher
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2008-01-03
  • Updated: 2010-04-04
  • Resolved: 2009-05-06
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
The new Java Plug-In reuses the standard java / javaw.exe launcher to run applets. In the previous "classic" plug-in, the JVM was embedded in the web browser process and custom JNI Invocation API code was used to create the JVM. In the classic plug-in, the ignoreUnrecognized flag was set to true, so that if the end user specified invalid JVM command-line arguments in the Java Control Panel, those invalid arguments (and only the invalid arguments) would be silently ignored, while other arguments specified would be obeyed.

Because the new plug-in uses the standard Java launcher, and because the launcher sets ignoreUnrecognized to false with no way to enable it, unfortunate behavior results. In order to fix 6613373 we are going to need to add logic to the new plug-in to see whether the target JVM launched successfully, and if not, clear out all user-specified command-line arguments and attempt to re-launch the applet.

It would be very helpful to have a HotSpot-internal command-line argument like -XX:+IgnoreUnrecognizedArguments or similar which would have the effect of enabling the ignoreUnrecognized flag for subsequent argument processing. It is feasible for the new Java Plug-In to detect whether this command line argument is supported and, if so, to add it near the beginning of the command line sent down to the Java launcher. This would support more compatible behavior with the old Java Plug-In in error cases while still allowing nearly complete reuse of the existing Java launcher in the new plug-in. The implementation should be small and self-contained within src/share/vm/runtime/arguments.cpp.

Comments
EVALUATION Fixed via 6788376 in hs15 b02, i.e. in jdk7 opensource tree.
06-05-2009