API java : RuntimeMXBean


java.lang.management
Interface RuntimeMXBean


public interface RuntimeMXBean

The management interface for the runtime system of the Java virtual machine.

A Java virtual machine has a single instance of the implementation class of this interface. This instance implementing this interface is an MXBean that can be obtained by calling the ManagementFactory.getRuntimeMXBean() method or from the platform MBeanServer method.

The ObjectName for uniquely identifying the MXBean for the runtime system within an MBeanServer is:

java.lang:type=Runtime

This interface defines several convenient methods for accessing system properties about the Java virtual machine.

Since:
1.5
See Also:
JMX Specification., Ways to Access MXBeans

Method Summary
 String getBootClassPath()
          Returns the boot class path that is used by the bootstrap class loader to search for class files.
 String getClassPath()
          Returns the Java class path that is used by the system class loader to search for class files.
 List<String> getInputArguments()
          Returns the input arguments passed to the Java virtual machine which does not include the arguments to the main method.
 String getLibraryPath()
          Returns the Java library path.
 String getManagementSpecVersion()
          Returns the version of the specification for the management interface implemented by the running Java virtual machine.
 String getName()
          Returns the name representing the running Java virtual machine.
 String getSpecName()
          Returns the Java virtual machine specification name.
 String getSpecVendor()
          Returns the Java virtual machine specification vendor.
 String getSpecVersion()
          Returns the Java virtual machine specification version.
 long getStartTime()
          Returns the start time of the Java virtual machine in milliseconds.
 Map<String,String> getSystemProperties()
          Returns a map of names and values of all system properties.
 long getUptime()
          Returns the uptime of the Java virtual machine in milliseconds.
 String getVmName()
          Returns the Java virtual machine implementation name.
 String getVmVendor()
          Returns the Java virtual machine implementation vendor.
 String getVmVersion()
          Returns the Java virtual machine implementation version.
 boolean isBootClassPathSupported()
          Tests if the Java virtual machine supports the boot class path mechanism used by the bootstrap class loader to search for class files.
 

Method Detail

getName

String getName()
Returns the name representing the running Java virtual machine. The returned name string can be any arbitrary string and a Java virtual machine implementation can choose to embed platform-specific useful information in the returned name string. Each running virtual machine could have a different name.

Returns:
the name representing the running Java virtual machine.

getVmName

String getVmName()
Returns the Java virtual machine implementation name. This method is equivalent to System.getProperty("java.vm.name").

Returns:
the Java virtual machine implementation name.
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow access to this system property.
See Also:
SecurityManager.checkPropertyAccess(java.lang.String), System.getProperty(java.lang.String)

getVmVendor

String getVmVendor()
Returns the Java virtual machine implementation vendor. This method is equivalent to System.getProperty("java.vm.vendor").

Returns:
the Java virtual machine implementation vendor.
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow access to this system property.
See Also:
SecurityManager.checkPropertyAccess(java.lang.String), System.getProperty(java.lang.String)

getVmVersion

String getVmVersion()
Returns the Java virtual machine implementation version. This method is equivalent to System.getProperty("java.vm.version").

Returns:
the Java virtual machine implementation version.
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow access to this system property.
See Also:
SecurityManager.checkPropertyAccess(java.lang.String), System.getProperty(java.lang.String)

getSpecName

String getSpecName()
Returns the Java virtual machine specification name. This method is equivalent to System.getProperty("java.vm.specification.name").

Returns:
the Java virtual machine specification name.
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow access to this system property.
See Also:
SecurityManager.checkPropertyAccess(java.lang.String), System.getProperty(java.lang.String)

getSpecVendor

String getSpecVendor()
Returns the Java virtual machine specification vendor. This method is equivalent to System.getProperty("java.vm.specification.vendor").

Returns:
the Java virtual machine specification vendor.
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow access to this system property.
See Also:
SecurityManager.checkPropertyAccess(java.lang.String), System.getProperty(java.lang.String)

getSpecVersion

String getSpecVersion()
Returns the Java virtual machine specification version. This method is equivalent to System.getProperty("java.vm.specification.version").

Returns:
the Java virtual machine specification version.
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow access to this system property.
See Also:
SecurityManager.checkPropertyAccess(java.lang.String), System.getProperty(java.lang.String)

getManagementSpecVersion

String getManagementSpecVersion()
Returns the version of the specification for the management interface implemented by the running Java virtual machine.

Returns:
the version of the specification for the management interface implemented by the running Java virtual machine.

getClassPath

String getClassPath()
Returns the Java class path that is used by the system class loader to search for class files. This method is equivalent to System.getProperty("java.class.path").

Multiple paths in the Java class path are separated by the path separator character of the platform of the Java virtual machine being monitored.

Returns:
the Java class path.
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow access to this system property.
See Also:
SecurityManager.checkPropertyAccess(java.lang.String), System.getProperty(java.lang.String)

getLibraryPath

String getLibraryPath()
Returns the Java library path. This method is equivalent to System.getProperty("java.library.path").

Multiple paths in the Java library path are separated by the path separator character of the platform of the Java virtual machine being monitored.

Returns:
the Java library path.
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow access to this system property.
See Also:
SecurityManager.checkPropertyAccess(java.lang.String), System.getProperty(java.lang.String)

isBootClassPathSupported

boolean isBootClassPathSupported()
Tests if the Java virtual machine supports the boot class path mechanism used by the bootstrap class loader to search for class files.

Returns:
true if the Java virtual machine supports the class path mechanism; false otherwise.

getBootClassPath

String getBootClassPath()
Returns the boot class path that is used by the bootstrap class loader to search for class files.

Multiple paths in the boot class path are separated by the path separator character of the platform on which the Java virtual machine is running.

A Java virtual machine implementation may not support the boot class path mechanism for the bootstrap class loader to search for class files. The isBootClassPathSupported() method can be used to determine if the Java virtual machine supports this method.

Returns:
the boot class path.
Throws:
UnsupportedOperationException - if the Java virtual machine does not support this operation.
SecurityException - if a security manager exists and the caller does not have ManagementPermission("monitor").

getInputArguments

List<String> getInputArguments()
Returns the input arguments passed to the Java virtual machine which does not include the arguments to the main method. This method returns an empty list if there is no input argument to the Java virtual machine.

Some Java virtual machine implementations may take input arguments from multiple different sources: for examples, arguments passed from the application that launches the Java virtual machine such as the 'java' command, environment variables, configuration files, etc.

Typically, not all command-line options to the 'java' command are passed to the Java virtual machine. Thus, the returned input arguments may not include all command-line options.

MBeanServer access:
The mapped type of List is String[].

Returns:
a list of String objects; each element is an argument passed to the Java virtual machine.
Throws:
SecurityException - if a security manager exists and the caller does not have ManagementPermission("monitor").

getUptime

long getUptime()
Returns the uptime of the Java virtual machine in milliseconds.

Returns:
uptime of the Java virtual machine in milliseconds.

getStartTime

long getStartTime()
Returns the start time of the Java virtual machine in milliseconds. This method returns the approximate time when the Java virtual machine started.

Returns:
start time of the Java virtual machine in milliseconds.

getSystemProperties

Map<String,String> getSystemProperties()
Returns a map of names and values of all system properties. This method calls System.getProperties() to get all system properties. Properties whose name or value is not a String are omitted.

MBeanServer access:
The mapped type of Map is TabularData with two items in each row as follows:

Item Name Item Type
key String
value String

Returns:
a map of names and values of all system properties.
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow access to the system properties.

Ces informations proviennent du site de http://java.sun.com

Remarques

Contenu

Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :

Quels sont les motivations de cette démarche?

Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.

Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.

Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.

Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.

Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.

Réseaux sociaux

Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.

 

Nuage de mots clés

7 mots clés dont 0 définis manuellement (plus d'information...).

Avertissement

Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.

Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.

 

Astuce pour imprimer les couleurs des cellules de tableaux : http://www.gaudry.be/ast-rf-450.html
Aucun commentaire pour cette page

© Ce document issu de l′infobrol est enregistré sous le certificat Cyber PrInterDeposit Digital Numbertection. Enregistrement IDDN n° 5329-2608
Document créé le 31/08/06 00:41, dernière modification le Vendredi 17 Juin 2011, 12:12
Source du document imprimé : http://www.gaudry.be/java-api-rf-java/lang/management/RuntimeMXBean.html Document affiché 1 fois ce mois de Juin.
St.Gaudry©07.01.02
Outils (masquer)
||
Recherche (afficher)
Recherche :

Utilisateur (masquer)
Apparence (afficher)
Stats (afficher)
15832 documents
452 astuces.
549 niouzes.
3099 definitions.
447 membres.
8115 messages.

Document genere en :
0,70 seconde

Mises à jour :
Mises à jour du site
Citation (masquer)
FACILE : Se dit d'une femme qui a la moralité sexuelle d'un homme.

Pierre Desproges
 
l'infobrol
Nous sommes le Vendredi 01 Juin 2012, 17:29, toutes les heures sont au format GMT+1.00 Heure, heure d'été (+1)