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

JVM should not start with erroneous options

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      beta
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description



      Name: elR10090 Date: 01/16/2001



      Merlin JVM starts even if there is a misprint or error found in
      a command-line parameter. That means, that if one (or more) of
      command-line parameters is not recognized, Merlin JVM starts
      even so.

      This may cause hard-to-debug errors in user applications, especially
      if application is started with a script containing simple misprint
      like in the following samples:

      Following example shows like Client VM may be started instead of
      Server VM:

          >>>> jdk1.4/bin/java -server hello
          Hello world!

          >>>> jdk1.4/bin/java -Server hello
          Unrecognized option: -Server
          Hello world!

          >>>> jdk1.4/bin/java -Server -version
          Unrecognized option: -Server
          java version "1.4.0-beta"
          Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b47)
          Java HotSpot(TM) Client VM (build 1.4beta-B47, mixed mode)

      This example shows like JVM may start with incorrect heap size:

          >>>> jdk1.4/bin/java -Xmmx128m hello
          Unrecognized option: -Xmmx128m
          Hello world!

      I believe, that correct behavoiur should be to refuse starting
      if there is an un-recognized command-line parameter found.

      Please note, that earlier JVM's (Kestrel and Ladybird) behave
      correctly:

          >>>> jdk1.3.1/bin/java -server hello
          Hello world!

          >>>> jdk1.3.1/bin/java -Server hello
          Unrecognized option: -Server
          Could not create the Java virtual machine.

          >>>> jdk1.4/bin/java -Xmmx128m hello
          Unrecognized option: -Xmmx128m
          Hello world!


      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            hhuangsunw Hui Huang (Inactive)
            Reporter:
            latkinsunw Latkin Latkin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: