Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java runtime implementation for academic purposes

 
Ramya Chowdary
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 9258
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Campbell Ritchie
Sheriff
Posts: 48440
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48440
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Ramya Chowdary
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JVM is implemented by c/c++

JVM specification just gives idea, it doesn't give a dummy implementation.
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic