This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Should this work? A gij question
- From: Tom Tromey <tromey at redhat dot com>
- To: "Dr. VanBaalen" <jvb at uwyo dot edu>
- Cc: java at gcc dot gnu dot org
- Date: 04 May 2003 14:39:38 -0600
- Subject: Re: Should this work? A gij question
- References: <16053.12045.639842.750585@mons.cs.uwyo.edu>
- Reply-to: tromey at redhat dot com
>>>>> "Jeff" == VanBaalen <jvb@uwyo.edu> writes:
Jeff> I created a simple test that involves two classes: one I
Jeff> compiled to a .o file the other I compiled to a .class
Jeff> file. Here is the class I compiled to .o
Basically what you have to do here is put the compiled code into a .so
that is named after the class it implements. In your example this
would be "lib-Hello2.so".
This may not work in this particular case. I haven't tried it and I
don't feel like looking at the source right now. The problem, if
there is one, is that your class is in the unnamed package. This is
not very interesting in general; in real code you'd use a package and
that definitely does work.
Jeff> 1. I put the directory containing Hello2.o in my CLASSPATH variable
Jeff> and then typed
See the manual for the naming convention.
Jeff> 2. I created a jar file containing Hello.class and Hello2.o with an
Jeff> appropriate manifest and typed
This won't work.
Jeff> Should it be possible to run this "hybrid" example?
Note that interpreted code can refer to compiled code fairly easily,
but the reverse doesn't work. This is something we hope to fix in the
future. In the current cvs trunk it works ok, though there are some
bugs and it is fragile. In the long term we have a plan which will
make it more robust.
Tom