Question about Java SE Source Code
I was wondering, what is Java SE written in? Can't be Java right? Since thats like the chicken and the egg. Can't write in Java unless you have a platform to interpret Java code into byte code, but if the platform is written in Java... what is interpreting the platform? The platform can't interpret itself right?
Little confused about it ^, I didn't post in the thread about open source Java since everyones just fighting on there about how old or new the news is. To tell ya the truth, I heard about it yesterday but didn't expect it so soon. Its nice that its here, its now fully Linux friendly. :D
I might download the code and take a look at it if its written in Java.
[697 byte] By [
kavon89a] at [2007-10-3 9:44:59]

> So you would have to be a C/C++ programmer to play with the virtual machine (improve it etc)?
Yes.
> Is the virtual machine even open sourced?
Er... Sun released today its virtual machine source and its compiler source under GPL v2.
They're available for download at the new [url https://openjdk.dev.java.net/]OpenJDK[/url] web page.
> I was wondering, what is Java SE written in? Can't be
> Java right? Since thats like the chicken and the egg.
> Can't write in Java unless you have a platform to
> interpret Java code into byte code, but if the
> platform is written in Java... what is interpreting
> the platform? The platform can't interpret itself
> right?
>
So you write the 0.0.1 compiler and runtime in something else.
Using that you create and compile a Java version that you call 0.0.2.
You now have a compiler written in Java that can compile Java.
The runtime is a bit more complex as it needs some platform specific bootstrapping code, but most of that can be written in Java as well.
And that's no theory, it's what actually happens (and not just with Java).
Not everything is Java, but a good chunk certainly is (or can be).
Small nitpick: Sun's JVM is written in a combination of C and C++. I know
of at least one other JVM where the nucleus, the part that actually interprets
the byte code instructions, is written in ARM assembly language for
performance reasons.
kind regards,
Jos ( < nasty nitpicker ;-)