Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How much of the Java SE api is written in Java?

Tags:

java

How much of the Java SE api is actually written in Java itself?

like image 952
Michael Avatar asked Apr 17 '09 18:04

Michael


2 Answers

The easiest way to find out is just to look at the source code (that's from Sun's J2SE website; there's also the OpenJDK source for 6 and 7). It's pretty much as you'd expect - things which absolutely have to be written in native code, e.g. "open a socket or a file" are native, but almost everything else is written in Java (in Sun's implementation, anyway).

like image 121
Jon Skeet Avatar answered Sep 28 '22 02:09

Jon Skeet


Download OpenJDK and find out!

Most of it is Java, but there are some low-level things that must be native code (graphics and file operations come to mind).

like image 24
Michael Myers Avatar answered Sep 28 '22 03:09

Michael Myers