Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6646674

Add mechanism for ignoring unrecognized command-line arguments with standard Java launcher


    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 6u10
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • CPU:
    • OS:


      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.


          Issue Links



              • Assignee:
                kamg Keith Mcguigan
                kbr Kenneth Russell (Inactive)
              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created: