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

No Output is produced by compiler, for few of the compiler options.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.2
    • 1.4.1, 1.4.2_02
    • tools
    • mantis
    • sparc
    • solaris_8

      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 % javac -J-version
      java version "1.4.1-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b06)
      Java HotSpot(TM) Client VM (build 1.4.1-beta-b06, mixed mode)
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 % cat Test.java
      class Test { }
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 % javac -classpath Test.java
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %

      Should be printing the compiler usage option. Since, Test.java is classpath
      option, and no java source file is specified in command line.

      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 % ls
      ./ ../ Test.java*

      No Class File is produced.

      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 % javac -sourcepath Test.java
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 % ls
      ./ ../ Test.java*

      Same as the above case. No class file is produced. Nor any error message is given.

      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 % javac -bootclasspath Test.java
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 % ls
      ./ ../ Test.java*

      Again. No class file is produced, nor any error message is given.

      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 % javac -d Test.java
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 % ls
      ./ ../ Test.java*
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %
      goldeneye:/net/sqindia/export/disk03/tools/surendra/javac-test/test1 %

      No error message, nor class file is produced.


      ###@###.### 2003-12-10

      here's a simple class to reproduce this behavior.

      to run, just create some dumb class called foo.java (mine is
      below) and
      then run TestJavac using both 1.4.1 and 1.4.2/1.5

      In our code we call com.sun.javac.Main and if there is an empty
      set of classes passed to it in 141 we had no error, in 142 we get
      error
      code 2.




      import com.sun.tools.javac.Main;

      public class TestJavac {
        public static void main(String[] Rgs) {
          String[] goodargs = { "-d", ".", "foo.java" };
          String[] badargs = { "-d", "." };
          Main compiler = new Main();
          int goodout = compiler.compile(goodargs);
          int badout = compiler.compile(badargs);
          System.out.println("good out: " + goodout);
          System.out.println("bad out: " + badout);
        }
      }

      public class foo {
        private int blabber;
        public foo() {
          blabber = 1;
        }
      }

            gafter Neal Gafter (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: