This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Should this work? A gij question
- From: "Dr. VanBaalen" <jvb at uwyo dot edu>
- To: java at gcc dot gnu dot org
- Date: Sun, 4 May 2003 09:17:33 -0600
- Subject: Should this work? A gij question
I am running gcc 3.2.3 on RedHat 7.2. I am attempting to understand
the capabilities of gij wrt to running compiled and interpreted code
together. I created a simple test that involves two classes: one I
compiled to a .o file the other I compiled to a .class file. Here is
the class I compiled to .o
import java.io.* ;
public class Hello2 {
public Hello2() { System.out.println("My hello2 class prog"); }
}
Here is the main class which I compiled to .class
import java.io.*;
public class Hello {
public Hello() { System.out.println("My hello classprog"); }
public static void main(String args[]) {
Hello hello = new Hello();
Hello2 hello2 = new Hello2();
}
}
Since gij 3.2.3 and before does not have a classpath argument, I tried
two ways to get this simple program to run in gij.
1. I put the directory containing Hello2.o in my CLASSPATH variable
and then typed
gij Hello
in the directory containing Hello.class
I got a ClassNotFoundException: Hello2.
2. I created a jar file containing Hello.class and Hello2.o with an
appropriate manifest and typed
gij -jar Hello.jar
I got a different link error.
Should it be possible to run this "hybrid" example? If so, what am I
doing wrong?
Thanks in advance,
Jeff
----