aspose file tools*
The moose likes Java in General and the fly likes Java runtime implementation for academic purposes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java runtime implementation for academic purposes" Watch "Java runtime implementation for academic purposes" New topic
Author

Java runtime implementation for academic purposes

Pratap koritala
Ranch Hand

Joined: Sep 27, 2006
Posts: 252
Hello all,

Is there any light version of Java runtime for academic purposes...

I always wanted to know the internal working of Java . I know its very large code base,huge for one to understand.

But,Is there any implementation with very little and simple code,so that one can understand the internals of java and System.

I always wondered how come one can build JVM from JVM specification.
[ June 02, 2008: Message edited by: Pratap Chowdary ]
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8908
    
    8

How can you have a "light" version of Java and still call it Java? It has to implement the Java specification, so it's going to be fairly non-trivial.
That said, there is GCJ/libgcj, which is open-source and not fully JDK 1.4 compliant, so it may be your best bet.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38851
    
  23
If you want to see some of the implementation details, go into your Java installation folder and find the file called src.zip or similar. Unzip that and explore it; you will find the code for all the well-known Java API classes in there.
Nicholas Jordan
Ranch Hand

Joined: Sep 17, 2006
Posts: 1282
There are some 'C' style headers, I think that is what the poster is looking for. Though I cannot read them yet, I can see that those headers provide a no-frills look into how java works.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38851
    
  23
I have never seen these C style headers, Nicholas. You have no idea where they are?

They might be something to do with JNI (Java Native Interface) or the native methods which are implemented in the Java Virtual Machine (JVM).
Pratap koritala
Ranch Hand

Joined: Sep 27, 2006
Posts: 252
JVM is implemented by c/c++

JVM specification just gives idea, it doesn't give a dummy implementation.
Nicholas Jordan
Ranch Hand

Joined: Sep 17, 2006
Posts: 1282
This is what I wast looking at: C:\Program Files\Java\jdk1.5.0_12\include\jvmdi.h I don't know that such is actually what the poster is looking for but the header really looks to me like something that would explain some general operating principles. EG:


RE: Originally posted by Campbell Ritchie:
I have never seen these C style headers, Nicholas. You have no idea where they are?
And thus would address Original Poster's JVM is implemented by c/c++ or at least it does that for me. I am not degreed in cs so let's split some nuances before getting head-on in determining what OP is looking for.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24184
    
  34

Those headers are indeed for folks working with the JNI -- you use the headers to write C/C++ code that plugs into the JVM to implement native methods, or to invoke the JVM from a C/C++ program of your own devising. They give precisely zero insight into the implementation of a JVM, since JNI is an implementation-indendent interface standard.

In any case, there's really no such thing as a "simple JVM implementation" -- it's a complicated thing. Instead, what you should be looking for is a good explanation of how the JVM works and how it might be implemented. There's the Java VM specification, available as a free download from Sun, which tells you everything a JVM is supposed to do; and there are a number of other books out there that try to give you an idea of how the JVM works.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java runtime implementation for academic purposes