The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

RE: A basic Question

Posted by Lee Collins on August 01, 2000 at 12:04 PM

> Why do we need to have different implementations of JVM for different platforms when JVM by Sun can do everything for us??
> I am new to Java


There has to be a JVM for each type of system eg. WindowsNT, Mac, RS6000, etc.

The JVM on a particular system know how to translate the bytecode for THAT system.

The different JVMs are how that you can write the program once and run it anywhere(that has a JVM). The JVM does the actual talking to the Operating System.

For instance, to open a File is differnt on different Operating Systems. To open a file on UNIX you would use the open() function. On NT you would use the OpenFile() function.

The Windows NT JVM will translate a call to open a file into a call to OpenFile() while a JVM for UNIX will translate those same bytecodes into a call to open().

Lee




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us