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

pit b77: javac puts the compiled class file in wrong dir

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1 P1
    • 6
    • 6
    • tools
    • None
    • b77
    • 6
    • b78
    • generic
    • generic
    • Verified

      Javac does not behave as as expected in pit build 77. In previous build and tiger release, Javac compiles a source file and put the corresponding class under the same directory as the source file. For example, suppose a class's full name is com.example.A, its source file A.java is under
      /com/exmple/A.java. If we use previous builds and releases to compile it:
      javac A.java
      it will generate A.class and put it under the same directory. While with this build, javac puts A.class under /com/exmple/com/examples directory which extends /com/example where A.java resides.
      This bug has severely influenced the existing tests and caused many of the tests fail.
      To reproduce:

      1.mkdir sqetest
      2.copy the following code to Sample.java under sqetest:
      -------------
      package sqetest;
      public class Sample {
         public static void main(String[] args) {
            System.out.println("where is the test class file");
         }
      }
      -------------
      3. compile with promoted build b76:
      The Sample.class will be put under sqetest : sqetest/Sample.class.
      4. compile with pit build 77:
      The Sample.class will be put under sqetest/sqetest: sqetest/sqetest/Sample.class

            ahe Peter Ahe
            lzhanorcl Lichun Zhan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: