Method getRuntime()
Return type:
java.lang.Runtime
Member of:
java.lang.Runtime
[
api documentation
] [
main menu
]
Examples of how the element is used
(one line per example):
[
add your own example
]
1
System.identityHashCode(Runtime.getRuntime());
2
return Runtime.getRuntime().totalMemory();
3
long freeMem = Runtime.getRuntime().freeMemory();
4
return Runtime.getRuntime().maxMemory();
5
fProcesses.add(Runtime.getRuntime().exec(new String[] { "/usr/bin/jar", "cf", dest, "-C", dir, "." })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
6
Runtime myRT = Runtime.getRuntime();
7
Runtime.getRuntime().addShutdownHook(new Thread() {
8
Process p = Runtime.getRuntime().exec("getenv");
9
nbProcs=Runtime.getRuntime().availableProcessors();
10
freeMemory = Runtime.getRuntime().freeMemory();
11
Runtime r = Runtime.getRuntime();
12
Runtime rt = Runtime.getRuntime();
13
fProcesses.add(Runtime.getRuntime().exec(new String[] { "/bin/cp", fromPath, to.getAbsolutePath() })); //$NON-NLS-1$
14
long mem = Runtime.getRuntime().freeMemory();
15
Process proc = Runtime.getRuntime().exec("jar cf " + name + " .", null, srcdir);
16
Runtime rt = Runtime.getRuntime();
17
System.out.println("Total memory = " + Runtime.getRuntime().totalMemory());
18
long freeMem = Runtime.getRuntime().freeMemory();
19
Runtime r = Runtime.getRuntime();
20
Runtime rt = Runtime.getRuntime();
Java and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other Countries.