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: libgcj_bc.so not embedded


Andrew Haley wrote:
Mohsen Saboorian writes:
> > > It's not supposed to be. The idea is that you compile your program
> > and it dynamically links with the libgcj installed on the system.
> > Then what happens for example in Windows, where there is no such
> linkable library. Is it possible to statically link my program with
> this .so file so that there would be an absolute stand-alone
> application?


Not quite, but you can link using -static-libgcj.  It doesn't work for
all Java programs,

Which ones doesn't work? If you know how to manually add objects that are not referenced (and thus aren't pulled into the binary), then everything is fine. At least for me...


and in general it's a bad idea.  Why do you want to
do this, anyway?

There seem to be two different universes of GCJ users. Both do not understand why the other even exists. I also live in the one that only wants GCJ to create standalone binaries. I can't imagine a reason why to use GCJ as JVM...
GCJ is (for me), good to:
- get around the problem of telling users to install a JVM. If they have to install one anyway, why don't then just use one from Sun which has less bugs?
- better protect the written code
The only other place where GCJ becomes handy are embedded devices. Of course there you can't install a JVM either and need standalone binaries... There then come's the other problem of the huge binaries ;-)


Just my 2cents...

Marco


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