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]
# 1
I think your question is what is javac written in. Java libraries are written in java.
Norweeda at 2007-7-15 5:01:33 > top of Java-index,Java Essentials,Java Programming...
# 2
You must be talking about the HotSpot virtual machine.It's written in C/C++.You can download the source from the [url https://openjdk.dev.java.net/]OpenJDK[/url] page.
jfbrierea at 2007-7-15 5:01:33 > top of Java-index,Java Essentials,Java Programming...
# 3
What about the platform? JRE I think it is called. What is that written in?
kavon89a at 2007-7-15 5:01:33 > top of Java-index,Java Essentials,Java Programming...
# 4
The JRE consists of the JVM and the set of standard class librairies.The JVM (the HotSpot virtual machine) is written in C/C++.The class librairies are written in Java.
jfbrierea at 2007-7-15 5:01:33 > top of Java-index,Java Essentials,Java Programming...
# 5
So you would have to be a C/C++ programmer to play with the virtual machine (improve it etc)? Is the virtual machine even open sourced?
kavon89a at 2007-7-15 5:01:33 > top of Java-index,Java Essentials,Java Programming...
# 6
Not yet, but the specification for the JVM is publicly available.
bckrispia at 2007-7-15 5:01:33 > top of Java-index,Java Essentials,Java Programming...
# 7

> 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.

jfbrierea at 2007-7-15 5:01:33 > top of Java-index,Java Essentials,Java Programming...
# 8

> 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).

jwentinga at 2007-7-15 5:01:33 > top of Java-index,Java Essentials,Java Programming...
# 9

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 ;-)

JosAHa at 2007-7-15 5:01:33 > top of Java-index,Java Essentials,Java Programming...