views:

140

answers:

6

Is they say that sun's java is opensource now - then can I compile all the patform from sources ?

I used gentoo and I found a great performance inmrovement wnen I compiled the system myself, so can it be done with java (both vm runtime and library classes ) ?

Is it possible to do under windows/linux ?

Did anyone do it ?

Does it make any sense ?

A: 

I am not quite sure why you would want to do this, other than for educational purposes.

Sun put quite a lot of effort in performance improvements in all aspects (JVM as well as default libs) and I see no reason why you would get it better.

Again, it's nice to know how to do it, but I wouldn't expect huge performance improvements.

Yuval A
+3  A: 

yes, that should be possible now -- and no, it will not give you any benefits unless you have a compiler that produces better byte code from the same source input. Given the simple nature of translating java to bytecode and the fact that most optimizations are done at runtime, that seems unlikely.

fforw
+3  A: 

Yes it's possible. If you check repositories for your linux distribution you will notice there is usually the option for OpenJDK. Everything you're after can be found on http://openjdk.java.net/.

John T
A: 

I would start looking here for your java jdk sources.

Noam Gal
+5  A: 

Yes you can. Prebuilt binaries, source code etc. are available in the OpenJDK project from Sun:

http://openjdk.java.net/

Whether it makes a difference to performance is hard to tell. It might, but usually the difference is not great.

sleske
A: 

Java compiles the programs to machine code, and from what I have gathered at the Sun web site, it is quite sensitive to which compiler is used. Hence you need to use a supported build environment to be certain that the result is 100% correct.

Building the JDK is NOT easy for the uninitiated so unless you feel at home reading Makefiles I would leave this project for later :)

Thorbjørn Ravn Andersen