I am having trouble getting a very simple java program to compile with gcj in which the
main java file invokes a constructor on a class defined in a package.
I have the CLASSPATH variable set to '.' (the current directory).
Here's the main program, which is in the directory I am invoking gcj from:
// pkgtest.java
import java.io.*;
import A.*;
public class pkgtest {
public static void main(String args[]){
A.B x= new A.B(3);
System.out.println(x.x);
}
}
And in a subdirectory A, I put B.java:
// A/B.java
package A;
public class B{
int x;
public B(int i){
x= i;
}
}
I run gcj like this:
gcj --main=pkgtest -o pkgtest pkgtest.java