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

Misleading warning message in java source-file mode

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 14, 15
    • Fix Version/s: 18
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b26

      Description

      > java --source 7 Test.java
      warning: [options] source value 7 is obsolete and will be removed in a future release
      warning: [options] target value 7 is obsolete and will be removed in a future release
      warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
      3 warnings

      java --source 7 -Xlint:-options Test.java
      Unrecognized option: -Xlint:-options
      Error: Could not create the Java Virtual Machine.
      Error: A fatal exception has occurred. Program will exit.

      It seems the obsoletion warning comes from the javac part of the code and it assumes you are executing the javac launcher.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              asotona Adam Sotona
              Reporter:
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: