compiling an RMI server application
Tom Tromey
tromey@cygnus.com
Wed May 26 10:44:00 GMT 1999
>>>>> "Robert" == Robert Lebowitz <lebowitz@finaltouch.com> writes:
Robert> However, because you indicate that your compiler can take a
Robert> class file and produce an object from it, shouldn't it be
Robert> possible to use the Sun classes (licensing issues aside?).
It might be possible for some libraries, once we have JNI support. I
doubt it will be possible for the base libraries, though, especially
java.lang.
Robert> 2. I'm a little confused as to how to use the -I and
Robert> --CLASSPATH commandline options. For my own purposes, I
Robert> decided to override the default classpath by specifying my own
Robert> using --CLASSPATH, making sure to include gcjlib.zip.
There are some online docs about how to use these.
Here is the info in a nutshell (from jcf-path.c):
We support several different ways to set the class path.
built-in system directory (only libgcj.zip)
CLASSPATH environment variable
-CLASSPATH overrides CLASSPATH
-classpath option - overrides CLASSPATH, -CLASSPATH, and built-in
-I prepends path to list
You shouldn't need to include libgcj.zip in --CLASSPATH.
Robert> 3. Should I be attempting to compile (but not link) the
Robert> .class files I store in my jar files so that they can be
Robert> properly linked to the class containing a static main method
Robert> when I'm trying to construct an executable??? What is the
Robert> appropriate way to do this?
I recommend compiling from .java to .o if you can. If you use inner
classes or something, then compile from .class to .o.
What you do then is up to you. It's very similar to using C. You can
put all your .o files into a library. Or you can just link them all
together at once.
Does this answer your question? I'm not sure I really understood this
one.
Tom
More information about the Java
mailing list