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;
}
}
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;
}
}