Official Java Classes

  • Thread starter Dirk Bruere at NeoPax
  • Start date
J

Joshua Cranmer

Dirk said:
Just curious - does Sun write them in Java?

All Java classes use the JVM bytecode; some methods have native
implementations. Sun's classes are all written in Java, as is
practically all of its tools (javac is pretty much a tiny C shell around
executing a certain Java class).

Some classes have distinctly more native components, though, especially
those in java.lang and its friendly subpackages.
 
L

Lew

(Please put your point in the body of the message, not only the subject line.)
Just curious - does Sun write them [official Java classes] in Java?

Mike said:
Almost all of them. See the src.jar that comes with the JDK.

It's "src.zip" here. (Linux distro, Sun JDK 6u14.)

Joshua said:
All Java classes use the JVM bytecode; some methods have native
implementations. Sun's classes are all written in Java, as is
practically all of its tools (javac is pretty much a tiny C shell around
executing a certain Java class).

Some classes have distinctly more native components, though, especially
those in java.lang and its friendly subpackages.

Unfortunately I have yet to see source for those native methods.
 
M

Mike Schilling

Lew said:
(Please put your point in the body of the message, not only the
subject line.)
Dirk said:
Just curious - does Sun write them [official Java classes] in
Java?

Mike said:
Almost all of them. See the src.jar that comes with the JDK.

It's "src.zip" here. (Linux distro, Sun JDK 6u14.)

Yeah, here too.
Unfortunately I have yet to see source for those native methods.

Here's one:

http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/0a5b87833562/src/share/native/java/lang/Class.c
 
R

Roedy Green

Just curious - does Sun write them in Java?

Most of it you can look at in src.jar written in Java. The
platform-specific stuff (the native classes) have to be written in
C/C++. You can see that too. see http://mindprod.com/jgloss/jdk.html
for the link.
--
Roedy Green Canadian Mind Products
http://mindprod.com

"For reason that have a lot to do with US Government bureaucracy, we settled on the one issue everyone could agree on, which was weapons of mass destruction."
~ Paul Wolfowitz 2003-06, explaining how the Bush administration sold the Iraq war to a gullible public.
 
L

Lew

According to Lew:
Thomas said:

Why do you point to update 3 and not update 14? I went ahead and downloaded
the update 14 version.

Anyway, I have been getting my source.zip in the JDK, which does not include
the native methods.

This source build is a good reference, though, thanks. It's all there, I
suppose, but scattered all over. I'll peruse.
 
A

Arne Vajhøj

Lew said:
According to Lew:



Why do you point to update 3 and not update 14? I went ahead and
downloaded the update 14 version.

Anyway, I have been getting my source.zip in the JDK, which does not
include the native methods.

This source build is a good reference, though, thanks. It's all there,
I suppose, but scattered all over. I'll peruse.

The src.zip has been there for ages for reference purposes.

Publicizing all the stuff needed to build is a newer thing.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Can an Applet beep? 4
Java in Java 10
Delay 2
Free keyboard applet 5
ListModel name 10
JMF? 21
Java in Browser 57
File over network timeout 3

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top