Fwd: Using gcj to compile java

Bryce McKinlay mckinlay@redhat.com
Fri Jul 29 00:47:00 GMT 2005


Eric,

Perhaps your java classes are in a package? If the class name is 
org.foo.Main, you either need to run gcj from the directory that 
contains "org", or specify the top level directory using the --classpath 
option.

Bryce


Eric wrote:

>>Date: Thu, 28 Jul 2005 08:35:42 -0700 (PDT)
>>From: Eric <eric@semsyn.com>
>>Subject: Using gcj to compile java
>>To: gcc-help@gcc.gnu.org
>>
>>Hello,
>>
>>I'm trying to use gcj to compile a bunch of .java
>>files, but it doesn't seem to be able to work out
>>the
>>class dependencies.
>>
>>If I have all my .java files in one directory, and
>>if
>>I do "javac *.java", then java can compile them.
>>
>>But if I do "gcj *.java", then gcj gives me a bunch
>>of
>>errors saying that it can't find the classes, even
>>though the classes are there in the directory.
>>
>>How can I tell gcj that the classes are there?
>>    
>>



More information about the Java mailing list