Re: Forward declaration of classes needed when using GCJ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew W wrote:
Consider the following two classes placed in files ./net/mydomain/core/ClassA.java and
./net/mydomain/core/ClassB.java respectively:

package net.mydomain.core;
public class ClassA
{

public static void main(String[] args) throws Exception
{
ClassB classb = new ClassB();
}

}


package net.mydomain.core;
public class ClassB
{


}

If I compile this using the 'normal' Java compiler like this:
javac ./net/mydomain/core/ClassA.java ./net/mydomain/core/ClassB.java

it works fine.

Using the GCJ command:

gcj --main=ClassA ./net/mydomain/core/ClassA.java ./net/mydomain/core/ClassB.java

That should be:
gcj --main=net.mydomain.core.ClassA ./net/mydomain/core/ClassA.java ./net/mydomain/core/ClassB.java

David Daney

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux