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

error message is not clear when -source and -target does not match

XMLWordPrintable

    • b49
    • generic
    • generic


      ###@###.### 2004-03-12

      J2SE Version (please include all output from java -version flag):
        java version "1.5.0-beta2"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b40)
        Java HotSpot(TM) Server VM (build 1.5.0-beta2-b40, mixed mode)

      Does this problem occur on J2SE 1.3.x or 1.4.x? Yes / No (pick one)
        N/A

      Operating System Configuration Information (be specific):
        Linux dhcp-196.pirobase.de 2.6.3 #13 SMP Fri Feb 27 14:12:33 CET 2004 i686 unknown unknown GNU/Linux

      Bug Description:
        Downloaded xalan source release (e.g.
           http://www.apache.de/dist/xml/xalan-j/source/xalan-j_2_6_0-src.tar.gz)
        and tried to compile it using J2SDK 1.5.0-beta2-b40. It failed with the
        following error message:
        ------
         javac: source release 1.4 requires target release 1.4
        ------

         The ant build file (build.xml) says at line 256: <javac ... target="1.1">.
         Hmmm... 1.4 is not mentioned. 1.1 is mentioned; using ant version 1.5.4.

         If add 'source="1.3"' to the javac element, it compiles. J2SDK 1.4.2_03
         did not complain and compiles correctly which is due to the new DOM API -
         but that's Apache's problem.

         The error message should be more clear to state that If you specify
         -target 1.3 or earlier, you will be required to change the -source
         setting as well.


      Steps to Reproduce (be specific):
      1. Download xalan
      (e.g. http://www.apache.de/dist/xml/xalan-j/source/xalan-j_2_6_0-src.tar.gz)
      2. Extract with "tar xvf xalan-j_2_6_0-src-2jars.tar.gz"
      3. "cd xalan-j_2_6_0"
      4. "ant"

            gafter Neal Gafter (Inactive)
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: