This is the mail archive of the java-discuss@sources.redhat.com 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]

Re: GCJ not using java.lang.Exception in libgcj.jar??


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tom Tromey <tromey@redhat.com> writes:

> >>>>> "Kevin" == Kevin A Burton <burton@relativity.yi.org> writes:
> 
> Kevin> If you look at the UML on the website you can see visually how
> Kevin> JavaCore installs into the JVM.  Basically it replace
> Kevin> java.lang.Exception with its own version.
> 
> When you do this with the JVM I assume you have to edit their `rt.jar'
> or whatever it is called.  Right?

yeah... you just run jar to update the rt.jar.  It works with all classloaders
and JVMs so I haven't had a problem :).  I think the default mechanism for GCJ
installation woudl be just to patch the source (JavaCore is GPL also) and then
recompile.  

> Kevin> Basically this means that java.lang.Exception is not getting
> Kevin> instantiated as bytecode but instead is native... correct?
> 
> Yes.  The entire runtime and all the default class libraries are
> compiled, not interpreted.  We install the class files because the
> compiler needs to read them in order to compile other Java programs.

yeah... after sending my e-mail out that makes more sense.  I will have to
investigate building a .so from a .jar and linking against it... hm...

> Kevin> Could this be the problem?  java.lang.Exception under GCJ is
> Kevin> native and contained in libgcj.so?  If so this is strange... I
> Kevin> can't see any advantage to doing this and I think it might be a
> Kevin> Bad Thing.  There might be a speed advantage!?
> 
> I doubt there is a noticeable speed advantage for Exception.  However,
> I don't see how having this class be compiled could be considered a
> `Bad Thing'.  I think what you're trying to do isn't really guaranteed
> to work.  Also, libgcj is primarily a compiled Java environment.  So
> compiling Exception is in line with our goals.

yeah... I don't know either... just bugs me a little.  This could make dynamic
class loading wierd... maybe not.  Need to think about it.

> Why do you need to reimplement Exception, anyway?  That seems weird.

... I would just say read http://javacore.sourceforge.net ... this explains
everything.  

- -- 
Kevin A. Burton ( burton@apache.org, burton@openprivacy.org, burtonator@acm.org )
        Cell: 408-910-6145 URL: http://relativity.yi.org ICQ: 73488596 

Free Software!  Join the Software Jihad!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Get my public key at: http://relativity.yi.org/pgpkey.txt

iD8DBQE6c2HGAwM6xb2dfE0RAokOAKCrdbounr+x77gWaNAYQVR8Cqup/gCggJ+o
I/WYLhvkUP4TWs0BT4dS3FQ=
=Yowm
-----END PGP SIGNATURE-----



FBI Soviet KGB cryptographic strategic NORAD $400 million in gold bullion
Cocaine Albanian fissionable nuclear PLO World Trade Center class struggle BATF


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