[TriLUG] compiling java code with gij, running as binfmt code

Owen Berry oberry at trilug.org
Tue Aug 29 12:43:59 EDT 2006


On Tue, Aug 29, 2006 at 09:23:29AM -0700, Joseph Mack NA3T wrote:
> Is gij the gnu equivalent of javac? I have a HelloWorld.java 
> file which compiles under javac and the resulting class file 
> runs under java. Am I supposed to be able to do
> 
> $gij HelloWorld.java
> 
> and get HelloWorld.class?
> 
> (It gives an error
> 
> Exception in thread "main" java.langNoClassDefFoundError: HelloWorld.java)

man gij

NAME
      gij - GNU interpreter for Java bytecode
       ...

DESCRIPTION
       "gij" is a Java bytecode interpreter included with "libgcj".
       ...
       The primary argument to "gij" is the name of a class or, with
       "-jar", a jar file.
       ...

I've never used it before, but it looks like what you want to run is
"gij HelloWorld" after you've compiled your code.

Owen



More information about the TriLUG mailing list