Previous Page Next Page Start of Tutorial > Start of Trail > Start of Lesson Lesson Contents

Trail:
Essential Java Classes
Lesson:
Accessing System Resources



Help on searching
is available.

Search technology
by Excite, Inc.

The Runtime Object

At the core of the Java runtime environment are the Java virtual machine, the Java interpreter, and the host operating system.

The oval labelled Runtime in the diagram represents the current runtime environment and is an instance of the Runtime(in the API reference documentation) class. The current runtime environment could be anything from Sun's implementation of the Java virtual machine and interpreter running on Solaris to ACME Company's implementation of the virtual machine and interpreter running on the ACME toaster.

Runtime objects provide two services. First, they communicate with the components of the runtime environment--getting information and invoking functions. Second, Runtime objects are also the interface to system-dependent capabilities. For example, UNIX Runtime objects might support the getenv and setenv functions. Other Runtime objects, such as for Mac OS, might not support getenv and setenv because the host operating system doesn't support these functions, but they might support others.

Because the Runtime class is tightly integrated with the implementation of the Java interpreter, the Java virtual machine, and the host operating system, it is system-dependent. If objects in your program message the Runtime object directly, you sacrifice the system indepedent nature of you Java program. In general, this is not a good idea (particularly for applets).

 
Previous Page Next Page Start of Tutorial > Start of Trail > Start of Lesson Lesson Contents

Michel RIVEILL

Laboratoire I3S - Bât. ESSI
930 Route des Colles
06903 Sophia Antipolis CEDEX

email : riveill at unice.fr

Généralité

Projet Rainbow

Ressources en lignes

Les rubriques des cours :

 

Rechercher sur ce site avec Google

 

dernière mise à jour
le 08 juillet 2003

 

 

Réservation d'Hôtel à Prix Réduits - HotelClub