views:

82

answers:

2

Hi,

What are the architectural/system level changes has to made if I want to develop a JVM (Java Virtual Machine) like tool/application for Windows and Linux?

Basically, What are the architectural differences in JVM wrt Windows & Linux?

Thanks,

Naveen

+1  A: 

There's a good overview of what's involved in a JVM here:

http://www.artima.com/insidejvm/ed2/jvm.html

I'd guess the language of choice for implementing a JVM would be C++, with the low level stuff like memory management, thread management, io, etc it would be interacting with the API provided by a particular OS. Higher up features like bytecode interpretation could conceivably be common between platforms.

In terms of implementing something akin to a JVM, the answer to your question (and the difficulty of the task) would depend on the feature set you require. Do however bear in mind, VMs (Java and others) are in part abstractions of the OS and typically mirror the features provided by the OS.

Nick Holt
+2  A: 

The best answer here I think would be to point you at the source code and invite you to take a look.

"architectural differences" - Likely none. The architecture for the two VMs would likely be the same. What would differ is implementation of said architecture. The differences would be: Anything that hits a native OS call. Two examples that fly to mind would be: Threads and UI.

mlk