- Java.lang - Void
- Java.lang - Throwable
- Java.lang - ThreadLocal
- Java.lang - ThreadGroup
- Java.lang - Thread
- Java.lang - System
- Java.lang - StringBuilder
- Java.lang - StringBuffer
- Java.lang - String
- Java.lang - StrictMath
- Java.lang - StackTraceElement
- Java.lang - Short
- Java.lang - SecurityManager
- Java.lang - RuntimePermission
- Java.lang - Runtime
- Java.lang - ProcessBuilder
- Java.lang - Process
- Java.lang - Package
- Java.lang - Object
- Java.lang - Number
- Java.lang - Math
- Java.lang - Long
- Java.lang - Integer
- Java.lang - InheritableThreadLocal
- Java.lang - Float
- Java.lang - Enum
- Java.lang - Double
- Java.lang - Compiler
- Java.lang - ClassLoader
- Java.lang - Class
- Java.lang - Character.UnicodeBlock
- Java.lang - Character.Subset
- Java.lang - Character
- Java.lang - Byte
- Java.lang - Boolean
- Java.lang - Home
Java.lang Package extras
Java.lang Package Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Java.lang.Runtime Class
Introduction
The java.lang.Runtime class allows the apppcation to interface with the environment in which the apppcation is running.
Class Declaration
Following is the declaration for java.lang.Runtime class −
pubpc class Runtime extends Object
Class methods
Sr.No. | Method & Description |
---|---|
1 | This method registers a new virtual-machine shutdown hook. |
2 | This method returns the number of processors available to the Java virtual machine. |
3 | This method executes the specified string command in a separate process. |
4 | This method executes the specified command and arguments in a separate process. |
5 | This method executes the specified command and arguments in a separate process with the specified environment. |
6 | This method executes the specified command and arguments in a separate process with the specified environment and working directory. |
7 | This method executes the specified string command in a separate process with the specified environment. |
8 | This method executes the specified string command in a separate process with the specified environment and working directory. |
9 | This method terminates the currently running Java virtual machine by initiating its shutdown sequence. |
10 | This method returns the amount of free memory in the Java Virtual Machine. |
11 | This method runs the garbage collector. |
12 | This method returns the runtime object associated with the current Java apppcation. |
13 | This method forcibly terminates the currently running Java virtual machine. |
14 | This method loads the specified filename as a dynamic pbrary. |
15 | This method loads the dynamic pbrary with the specified pbrary name. |
16 | This method returns the maximum amount of memory that the Java virtual machine will attempt to use. |
17 | This method de-registers a previously-registered virtual-machine shutdown hook. |
18 | This method runs the finapzation methods of any objects pending finapzation. |
19 | This method returns the total amount of memory in the Java virtual machine. |
20 | This method enables/disables tracing of instructions. |
21 | This method enables/disables tracing of method calls. |
Methods inherited
This class inherits methods from the following classes −
java.lang.Object