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

-Xswitchcheck doesn't appear to be enabled in 1.4beta2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2
    • None
    • 1.4.0
    • tools
    • x86
    • windows_2000

    Description



      Name: rmT116609 Date: 09/06/2001


      java version "1.4.0-beta2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
      Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)


      Create Test.java (unnecessary really, but...):

      public class Test
      {
          public static void main (String [] args)
          {
              int x = 5;
              
              switch (x)
              {
                  case 0:
                      System.out.println ("0");
                  case 1:
                      System.out.println ("Oops");
                      break;
              }
          }
      }

      Try
      javac -Xswitchcheck Test.java

      Results:

      javac: invalid flag: -Xswitchcheck
      Usage: javac <options> <source files>
      where possible options include:
        -g Generate all debugging info
        -g:none Generate no debugging info
        -g:{lines,vars,source} Generate only some debugging info
        -O Optimize; may hinder debugging or enlarge class file

        -nowarn Generate no warnings
        -verbose Output messages about what the compiler is doing
        -deprecation Output source locations where deprecated APIs are us
      ed
        -classpath <path> Specify where to find user class files
        -sourcepath <path> Specify where to find input source files
        -bootclasspath <path> Override location of bootstrap class files
        -extdirs <dirs> Override location of installed extensions
        -d <directory> Specify where to place generated class files
        -encoding <encoding> Specify character encoding used by source files
        -source <release> Provide source compatibility with specified release
        -target <release> Generate class files for specific VM version
        -help Print a synopsis of standard options


      According to the 1.4beta2 docs the above should have worked.
      (See http://java.sun.com/j2se/1.4/docs/tooldocs/win32/javac.html)
      (Review ID: 130981)
      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              gafter Neal Gafter
              rmandalasunw Ranjith Mandala (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: