This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: java.io.Serializable - gcj 4.0.0 ok - more questions


huglhuglhugl@gmx.net writes:
 > 
 > >> Please use at least the latest stable version of GCJ. gcj-3.4 is
 > >> included in Debian Sarge and Sid. The recommended way is to check an
 > >> example reproducing code on you version against the latest 4.0 version
 > >> (not released yet). 
 > >> If you send exmaple code we can try for you.
 > 
 > >Pssst: It's included in the mail :-)
 > 
 > There's no problem using gcj 4.0.0 20050312 (prerelease), so I guess this is
 > not an issue anymore.
 > Thanks very much!
 > 
 > Still, I'm running into new problems, mostly because I don't understand how
 > gcj works. I'm not sure if this is the right place to ask, but I have
 > several questions:

This is the right place to ask.

 > Is there a comprehensive tutorial available which goes beyond HelloWorld? 
 > How shoud I compile bigger projects? all from .java -> .o and then link with
 > gcj --main=.... ?

I wouldn't do that.  Instead, I'd build libraries and link against them.

 > Should I compile .class files or .java files? Will there be any difference?

This is a rather complicated situation at the present time.

In theory you should always compile from Java source to object.
However, we are working on a new ABI for gcj that allows us fully to
comply with the rules in Chapter 13 of the Java Language Spec.  The
new ABI only works if you are compiling for .class files.  (We will
fix that.)

You only need care about the new ABI if you are going to build your
classes into libraries and want to be able to use these libraries
without recompiling if other libraries change.

On the other hand, if you don't use the new ABI, you have to recompile
all the users of Class A every time Class A changes.  This may or may
not be a big deal for you.

If you're linking statically you probably don't care about the new ABI.

 > Should I compile .jar files? 

This works.

 > Why doesn't --static work as expected?

I don't know what problem you're having exactly, but in general the
Java language is incompatible with static linkage.

 > Can I use serialized objects and transmit them over network to an
 > application running on sun's jre? (do they use the same serialization
 > format?)

Yes.  There may be bugs in this area, but we'll fix them.

 > Can I enable Java 1.5.0 features ?

No.

 > The gcj homepage says: "For javax.crypto support, we recommend the use of
 > GNU Crypto." How would I do this? I'd like to use javax.crypto or even an
 > SSLSocket.
 > Are there any constructs/packages that I shouldn't use when compiling with
 > gcj?
 > 
 > I hope I'm not annoying the mailinglist, asking the usual stuff.
 > I'm trying to convert a working java (1.5.0)
 > network-client-application into a binary, maybe even static (nodes
 > get netbooted, so bloating the binary might be smaller than adding
 > many libs). Should I maybe better try to write a new application in
 > C and then try to understand the serialized java-objects ?

I wouldn't do that.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]