Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / libjava / java / lang / Runtime.java
blob1094720404df28bb89f6405a645081946d159ea1
1 /* Runtime.java -- access to the VM process
2 Copyright (C) 1998, 2002, 2003, 2004 Free Software Foundation
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA.
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package java.lang;
41 import java.io.File;
42 import java.io.IOException;
43 import java.io.InputStream;
44 import java.io.OutputStream;
45 import java.util.HashSet;
46 import java.util.Iterator;
47 import java.util.Properties;
48 import java.util.Set;
49 import java.util.StringTokenizer;
51 /**
52 * Runtime represents the Virtual Machine.
54 * @author John Keiser
55 * @author Eric Blake (ebb9@email.byu.edu)
56 * @author Jeroen Frijters
58 // No idea why this class isn't final, since you can't build a subclass!
59 public class Runtime
61 /**
62 * The library path, to search when loading libraries. We can also safely use
63 * this as a lock for synchronization.
65 private final String[] libpath;
67 /**
68 * The current security manager. This is located here instead of in
69 * System, to avoid security problems, as well as bootstrap issues.
70 * Make sure to access it in a thread-safe manner; it is package visible
71 * to avoid overhead in java.lang.
73 static SecurityManager securityManager;
75 /**
76 * The default properties defined by the system. This is likewise located
77 * here instead of in Runtime, to avoid bootstrap issues; it is package
78 * visible to avoid overhead in java.lang. Note that System will add a
79 * few more properties to this collection, but that after that, it is
80 * treated as read-only.
82 * No matter what class you start initialization with, it defers to the
83 * superclass, therefore Object.<clinit> will be the first Java code
84 * executed. From there, the bootstrap sequence, up to the point that
85 * native libraries are loaded (as of March 24, when I traced this
86 * manually) is as follows:
88 * Object.<clinit> uses a String literal, possibly triggering initialization
89 * String.<clinit> calls WeakHashMap.<init>, triggering initialization
90 * AbstractMap, WeakHashMap, WeakHashMap$1 have no dependencies
91 * String.<clinit> calls CaseInsensitiveComparator.<init>, triggering
92 * initialization
93 * CaseInsensitiveComparator has no dependencies
94 * Object.<clinit> calls System.loadLibrary, triggering initialization
95 * System.<clinit> calls System.loadLibrary
96 * System.loadLibrary calls Runtime.getRuntime, triggering initialization
97 * Runtime.<clinit> calls Properties.<init>, triggering initialization
98 * Dictionary, Hashtable, and Properties have no dependencies
99 * Runtime.<clinit> calls VMRuntime.insertSystemProperties, triggering
100 * initialization of VMRuntime; the VM must make sure that there are
101 * not any harmful dependencies
102 * Runtime.<clinit> calls Runtime.<init>
103 * Runtime.<init> calls StringTokenizer.<init>, triggering initialization
104 * StringTokenizer has no dependencies
105 * System.loadLibrary calls Runtime.loadLibrary
106 * Runtime.loadLibrary should be able to load the library, although it
107 * will probably set off another string of initializations from
108 * ClassLoader first
110 static Properties defaultProperties = new Properties();
112 static
114 init();
115 insertSystemProperties(defaultProperties);
119 * The thread that started the exit sequence. Access to this field must
120 * be thread-safe; lock on libpath to avoid deadlock with user code.
121 * <code>runFinalization()</code> may want to look at this to see if ALL
122 * finalizers should be run, because the virtual machine is about to halt.
124 private Thread exitSequence;
127 * All shutdown hooks. This is initialized lazily, and set to null once all
128 * shutdown hooks have run. Access to this field must be thread-safe; lock
129 * on libpath to avoid deadlock with user code.
131 private Set shutdownHooks;
133 /** True if we should finalize on exit. */
134 private boolean finalizeOnExit;
137 * The one and only runtime instance. This must appear after the default
138 * properties have been initialized by the VM.
140 private static final Runtime current = new Runtime();
143 * Not instantiable by a user, this should only create one instance.
145 private Runtime()
147 if (current != null)
148 throw new InternalError("Attempt to recreate Runtime");
150 // We don't use libpath in the libgcj implementation. We still
151 // set it to something to allow the various synchronizations to
152 // work.
153 libpath = new String[0];
158 * Get the current Runtime object for this JVM. This is necessary to access
159 * the many instance methods of this class.
161 * @return the current Runtime object
163 public static Runtime getRuntime()
165 return current;
169 * Exit the Java runtime. This method will either throw a SecurityException
170 * or it will never return. The status code is returned to the system; often
171 * a non-zero status code indicates an abnormal exit. Of course, there is a
172 * security check, <code>checkExit(status)</code>.
174 * <p>First, all shutdown hooks are run, in unspecified order, and
175 * concurrently. Next, if finalization on exit has been enabled, all pending
176 * finalizers are run. Finally, the system calls <code>halt</code>.</p>
178 * <p>If this is run a second time after shutdown has already started, there
179 * are two actions. If shutdown hooks are still executing, it blocks
180 * indefinitely. Otherwise, if the status is nonzero it halts immediately;
181 * if it is zero, it blocks indefinitely. This is typically called by
182 * <code>System.exit</code>.</p>
184 * @param status the status to exit with
185 * @throws SecurityException if permission is denied
186 * @see #addShutdownHook(Thread)
187 * @see #runFinalizersOnExit(boolean)
188 * @see #runFinalization()
189 * @see #halt(int)
191 public void exit(int status)
193 SecurityManager sm = securityManager; // Be thread-safe!
194 if (sm != null)
195 sm.checkExit(status);
196 boolean first = false;
197 synchronized (libpath) // Synch on libpath, not this, to avoid deadlock.
199 if (exitSequence == null)
201 first = true;
202 exitSequence = Thread.currentThread();
203 if (shutdownHooks != null)
205 Iterator i = shutdownHooks.iterator();
206 while (i.hasNext()) // Start all shutdown hooks.
209 ((Thread) i.next()).start();
211 catch (IllegalThreadStateException e)
213 i.remove();
218 if (first)
220 if (shutdownHooks != null)
222 // Check progress of all shutdown hooks. As a hook completes,
223 // remove it from the set. If a hook calls exit, it removes
224 // itself from the set, then waits indefinitely on the
225 // exitSequence thread. Once the set is empty, set it to null to
226 // signal all finalizer threads that halt may be called.
227 while (! shutdownHooks.isEmpty())
229 Thread[] hooks;
230 synchronized (libpath)
232 hooks = new Thread[shutdownHooks.size()];
233 shutdownHooks.toArray(hooks);
235 for (int i = hooks.length; --i >= 0; )
236 if (! hooks[i].isAlive())
237 synchronized (libpath)
239 shutdownHooks.remove(hooks[i]);
243 Thread.sleep(1); // Give other threads a chance.
245 catch (InterruptedException e)
247 // Ignore, the next loop just starts sooner.
250 synchronized (libpath)
252 shutdownHooks = null;
255 // XXX Right now, it is the VM that knows whether runFinalizersOnExit
256 // is true; so the VM must look at exitSequence to decide whether
257 // this should be run on every object.
258 runFinalization();
260 else
261 synchronized (libpath)
263 if (shutdownHooks != null)
265 shutdownHooks.remove(Thread.currentThread());
266 status = 0; // Change status to enter indefinite wait.
270 if (first || status > 0)
271 halt(status);
272 while (true)
275 exitSequence.join();
277 catch (InterruptedException e)
279 // Ignore, we've suspended indefinitely to let all shutdown
280 // hooks complete, and to let any non-zero exits through, because
281 // this is a duplicate call to exit(0).
286 * Register a new shutdown hook. This is invoked when the program exits
287 * normally (because all non-daemon threads ended, or because
288 * <code>System.exit</code> was invoked), or when the user terminates
289 * the virtual machine (such as by typing ^C, or logging off). There is
290 * a security check to add hooks,
291 * <code>RuntimePermission("shutdownHooks")</code>.
293 * <p>The hook must be an initialized, but unstarted Thread. The threads
294 * are run concurrently, and started in an arbitrary order; and user
295 * threads or daemons may still be running. Once shutdown hooks have
296 * started, they must all complete, or else you must use <code>halt</code>,
297 * to actually finish the shutdown sequence. Attempts to modify hooks
298 * after shutdown has started result in IllegalStateExceptions.</p>
300 * <p>It is imperative that you code shutdown hooks defensively, as you
301 * do not want to deadlock, and have no idea what other hooks will be
302 * running concurrently. It is also a good idea to finish quickly, as the
303 * virtual machine really wants to shut down!</p>
305 * <p>There are no guarantees that such hooks will run, as there are ways
306 * to forcibly kill a process. But in such a drastic case, shutdown hooks
307 * would do little for you in the first place.</p>
309 * @param hook an initialized, unstarted Thread
310 * @throws IllegalArgumentException if the hook is already registered or run
311 * @throws IllegalStateException if the virtual machine is already in
312 * the shutdown sequence
313 * @throws SecurityException if permission is denied
314 * @since 1.3
315 * @see #removeShutdownHook(Thread)
316 * @see #exit(int)
317 * @see #halt(int)
319 public void addShutdownHook(Thread hook)
321 SecurityManager sm = securityManager; // Be thread-safe!
322 if (sm != null)
323 sm.checkPermission(new RuntimePermission("shutdownHooks"));
324 if (hook.isAlive() || hook.getThreadGroup() == null)
325 throw new IllegalArgumentException();
326 synchronized (libpath)
328 if (exitSequence != null)
329 throw new IllegalStateException();
330 if (shutdownHooks == null)
331 shutdownHooks = new HashSet(); // Lazy initialization.
332 if (! shutdownHooks.add(hook))
333 throw new IllegalArgumentException();
338 * De-register a shutdown hook. As when you registered it, there is a
339 * security check to remove hooks,
340 * <code>RuntimePermission("shutdownHooks")</code>.
342 * @param hook the hook to remove
343 * @return true if the hook was successfully removed, false if it was not
344 * registered in the first place
345 * @throws IllegalStateException if the virtual machine is already in
346 * the shutdown sequence
347 * @throws SecurityException if permission is denied
348 * @since 1.3
349 * @see #addShutdownHook(Thread)
350 * @see #exit(int)
351 * @see #halt(int)
353 public boolean removeShutdownHook(Thread hook)
355 SecurityManager sm = securityManager; // Be thread-safe!
356 if (sm != null)
357 sm.checkPermission(new RuntimePermission("shutdownHooks"));
358 synchronized (libpath)
360 if (exitSequence != null)
361 throw new IllegalStateException();
362 if (shutdownHooks != null)
363 return shutdownHooks.remove(hook);
365 return false;
369 * Forcibly terminate the virtual machine. This call never returns. It is
370 * much more severe than <code>exit</code>, as it bypasses all shutdown
371 * hooks and initializers. Use caution in calling this! Of course, there is
372 * a security check, <code>checkExit(status)</code>.
374 * @param status the status to exit with
375 * @throws SecurityException if permission is denied
376 * @since 1.3
377 * @see #exit(int)
378 * @see #addShutdownHook(Thread)
380 public void halt(int status)
382 SecurityManager sm = securityManager; // Be thread-safe!
383 if (sm != null)
384 sm.checkExit(status);
385 exitInternal(status);
389 * Tell the VM to run the finalize() method on every single Object before
390 * it exits. Note that the JVM may still exit abnormally and not perform
391 * this, so you still don't have a guarantee. And besides that, this is
392 * inherently unsafe in multi-threaded code, as it may result in deadlock
393 * as multiple threads compete to manipulate objects. This value defaults to
394 * <code>false</code>. There is a security check, <code>checkExit(0)</code>.
396 * @param finalizeOnExit whether to finalize all Objects on exit
397 * @throws SecurityException if permission is denied
398 * @see #exit(int)
399 * @see #gc()
400 * @since 1.1
401 * @deprecated never rely on finalizers to do a clean, thread-safe,
402 * mop-up from your code
404 public static void runFinalizersOnExit(boolean finalizeOnExit)
406 SecurityManager sm = securityManager; // Be thread-safe!
407 if (sm != null)
408 sm.checkExit(0);
409 current.finalizeOnExit = finalizeOnExit;
413 * Create a new subprocess with the specified command line. Calls
414 * <code>exec(cmdline, null, null)</code>. A security check is performed,
415 * <code>checkExec</code>.
417 * @param cmdline the command to call
418 * @return the Process object
419 * @throws SecurityException if permission is denied
420 * @throws IOException if an I/O error occurs
421 * @throws NullPointerException if cmdline is null
422 * @throws IndexOutOfBoundsException if cmdline is ""
424 public Process exec(String cmdline) throws IOException
426 return exec(cmdline, null, null);
430 * Create a new subprocess with the specified command line and environment.
431 * If the environment is null, the process inherits the environment of
432 * this process. Calls <code>exec(cmdline, env, null)</code>. A security
433 * check is performed, <code>checkExec</code>.
435 * @param cmdline the command to call
436 * @param env the environment to use, in the format name=value
437 * @return the Process object
438 * @throws SecurityException if permission is denied
439 * @throws IOException if an I/O error occurs
440 * @throws NullPointerException if cmdline is null, or env has null entries
441 * @throws IndexOutOfBoundsException if cmdline is ""
443 public Process exec(String cmdline, String[] env) throws IOException
445 return exec(cmdline, env, null);
449 * Create a new subprocess with the specified command line, environment, and
450 * working directory. If the environment is null, the process inherits the
451 * environment of this process. If the directory is null, the process uses
452 * the current working directory. This splits cmdline into an array, using
453 * the default StringTokenizer, then calls
454 * <code>exec(cmdArray, env, dir)</code>. A security check is performed,
455 * <code>checkExec</code>.
457 * @param cmdline the command to call
458 * @param env the environment to use, in the format name=value
459 * @param dir the working directory to use
460 * @return the Process object
461 * @throws SecurityException if permission is denied
462 * @throws IOException if an I/O error occurs
463 * @throws NullPointerException if cmdline is null, or env has null entries
464 * @throws IndexOutOfBoundsException if cmdline is ""
465 * @since 1.3
467 public Process exec(String cmdline, String[] env, File dir)
468 throws IOException
470 StringTokenizer t = new StringTokenizer(cmdline);
471 String[] cmd = new String[t.countTokens()];
472 for (int i = 0; i < cmd.length; i++)
473 cmd[i] = t.nextToken();
474 return exec(cmd, env, dir);
478 * Create a new subprocess with the specified command line, already
479 * tokenized. Calls <code>exec(cmd, null, null)</code>. A security check
480 * is performed, <code>checkExec</code>.
482 * @param cmd the command to call
483 * @return the Process object
484 * @throws SecurityException if permission is denied
485 * @throws IOException if an I/O error occurs
486 * @throws NullPointerException if cmd is null, or has null entries
487 * @throws IndexOutOfBoundsException if cmd is length 0
489 public Process exec(String[] cmd) throws IOException
491 return exec(cmd, null, null);
495 * Create a new subprocess with the specified command line, already
496 * tokenized, and specified environment. If the environment is null, the
497 * process inherits the environment of this process. Calls
498 * <code>exec(cmd, env, null)</code>. A security check is performed,
499 * <code>checkExec</code>.
501 * @param cmd the command to call
502 * @param env the environment to use, in the format name=value
503 * @return the Process object
504 * @throws SecurityException if permission is denied
505 * @throws IOException if an I/O error occurs
506 * @throws NullPointerException if cmd is null, or cmd or env has null
507 * entries
508 * @throws IndexOutOfBoundsException if cmd is length 0
510 public Process exec(String[] cmd, String[] env) throws IOException
512 return exec(cmd, env, null);
516 * Create a new subprocess with the specified command line, already
517 * tokenized, and the specified environment and working directory. If the
518 * environment is null, the process inherits the environment of this
519 * process. If the directory is null, the process uses the current working
520 * directory. A security check is performed, <code>checkExec</code>.
522 * @param cmd the command to call
523 * @param env the environment to use, in the format name=value
524 * @param dir the working directory to use
525 * @return the Process object
526 * @throws SecurityException if permission is denied
527 * @throws IOException if an I/O error occurs
528 * @throws NullPointerException if cmd is null, or cmd or env has null
529 * entries
530 * @throws IndexOutOfBoundsException if cmd is length 0
531 * @since 1.3
533 public Process exec(String[] cmd, String[] env, File dir)
534 throws IOException
536 SecurityManager sm = securityManager; // Be thread-safe!
537 if (sm != null)
538 sm.checkExec(cmd[0]);
539 return execInternal(cmd, env, dir);
543 * Returns the number of available processors currently available to the
544 * virtual machine. This number may change over time; so a multi-processor
545 * program want to poll this to determine maximal resource usage.
547 * @return the number of processors available, at least 1
549 public native int availableProcessors();
552 * Find out how much memory is still free for allocating Objects on the heap.
554 * @return the number of bytes of free memory for more Objects
556 public native long freeMemory();
559 * Find out how much memory total is available on the heap for allocating
560 * Objects.
562 * @return the total number of bytes of memory for Objects
564 public native long totalMemory();
567 * Returns the maximum amount of memory the virtual machine can attempt to
568 * use. This may be <code>Long.MAX_VALUE</code> if there is no inherent
569 * limit (or if you really do have a 8 exabyte memory!).
571 * @return the maximum number of bytes the virtual machine will attempt
572 * to allocate
574 public native long maxMemory();
577 * Run the garbage collector. This method is more of a suggestion than
578 * anything. All this method guarantees is that the garbage collector will
579 * have "done its best" by the time it returns. Notice that garbage
580 * collection takes place even without calling this method.
582 public native void gc();
585 * Run finalization on all Objects that are waiting to be finalized. Again,
586 * a suggestion, though a stronger one than {@link #gc()}. This calls the
587 * <code>finalize</code> method of all objects waiting to be collected.
589 * @see #finalize()
591 public native void runFinalization();
594 * Tell the VM to trace every bytecode instruction that executes (print out
595 * a trace of it). No guarantees are made as to where it will be printed,
596 * and the VM is allowed to ignore this request.
598 * @param on whether to turn instruction tracing on
600 public native void traceInstructions(boolean on);
603 * Tell the VM to trace every method call that executes (print out a trace
604 * of it). No guarantees are made as to where it will be printed, and the
605 * VM is allowed to ignore this request.
607 * @param on whether to turn method tracing on
609 public native void traceMethodCalls(boolean on);
612 * Load a native library using the system-dependent filename. This is similar
613 * to loadLibrary, except the only name mangling done is inserting "_g"
614 * before the final ".so" if the VM was invoked by the name "java_g". There
615 * may be a security check, of <code>checkLink</code>.
617 * @param filename the file to load
618 * @throws SecurityException if permission is denied
619 * @throws UnsatisfiedLinkError if the library is not found
621 public void load(String filename)
623 SecurityManager sm = securityManager; // Be thread-safe!
624 if (sm != null)
625 sm.checkLink(filename);
626 _load(filename, false);
630 * Load a native library using a system-independent "short name" for the
631 * library. It will be transformed to a correct filename in a
632 * system-dependent manner (for example, in Windows, "mylib" will be turned
633 * into "mylib.dll"). This is done as follows: if the context that called
634 * load has a ClassLoader cl, then <code>cl.findLibrary(libpath)</code> is
635 * used to convert the name. If that result was null, or there was no class
636 * loader, this searches each directory of the system property
637 * <code>java.library.path</code> for a file named
638 * <code>System.mapLibraryName(libname)</code>. There may be a security
639 * check, of <code>checkLink</code>.
641 * @param libname the library to load
643 * @throws SecurityException if permission is denied
644 * @throws UnsatisfiedLinkError if the library is not found
646 * @see System#mapLibraryName(String)
647 * @see ClassLoader#findLibrary(String)
649 public void loadLibrary(String libname)
651 // This is different from the Classpath implementation, but I
652 // believe it is more correct.
653 SecurityManager sm = securityManager; // Be thread-safe!
654 if (sm != null)
655 sm.checkLink(libname);
656 _load(libname, true);
660 * Return a localized version of this InputStream, meaning all characters
661 * are localized before they come out the other end.
663 * @param in the stream to localize
664 * @return the localized stream
665 * @deprecated <code>InputStreamReader</code> is the preferred way to read
666 * local encodings
668 public InputStream getLocalizedInputStream(InputStream in)
670 return in;
674 * Return a localized version of this OutputStream, meaning all characters
675 * are localized before they are sent to the other end.
677 * @param out the stream to localize
678 * @return the localized stream
679 * @deprecated <code>OutputStreamWriter</code> is the preferred way to write
680 * local encodings
682 public OutputStream getLocalizedOutputStream(OutputStream out)
684 return out;
688 * Native method that actually shuts down the virtual machine.
690 * @param status the status to end the process with
692 native void exitInternal(int status);
695 * Load a file. If it has already been loaded, do nothing. The name has
696 * already been mapped to a true filename.
698 * @param filename the file to load
699 * @param do_search True if we should search the load path for the file
701 native void _load(String filename, boolean do_search);
704 *This is a helper function for the ClassLoader which can load
705 * compiled libraries. Returns true if library (which is just the
706 * base name -- path searching is done by this function) was loaded,
707 * false otherwise.
709 native boolean loadLibraryInternal(String libname);
712 * A helper for Runtime static initializer which does some internal native
713 * initialization.
715 private static native void init ();
718 * Map a system-independent "short name" to the full file name, and append
719 * it to the path.
720 * XXX This method is being replaced by System.mapLibraryName.
722 * @param pathname the path
723 * @param libname the short version of the library name
724 * @return the full filename
726 static native String nativeGetLibname(String pathname, String libname);
729 * Execute a process. The command line has already been tokenized, and
730 * the environment should contain name=value mappings. If directory is null,
731 * use the current working directory; otherwise start the process in that
732 * directory.
734 * @param cmd the non-null command tokens
735 * @param env the non-null environment setup
736 * @param dir the directory to use, may be null
737 * @return the newly created process
738 * @throws NullPointerException if cmd or env have null elements
739 * @throws IOException if the exec fails
741 native Process execInternal(String[] cmd, String[] env, File dir)
742 throws IOException;
746 * Get the system properties. This is done here, instead of in System,
747 * because of the bootstrap sequence. Note that the native code should
748 * not try to use the Java I/O classes yet, as they rely on the properties
749 * already existing. The only safe method to use to insert these default
750 * system properties is {@link Properties#setProperty(String, String)}.
752 * <p>These properties MUST include:
753 * <dl>
754 * <dt>java.version <dd>Java version number
755 * <dt>java.vendor <dd>Java vendor specific string
756 * <dt>java.vendor.url <dd>Java vendor URL
757 * <dt>java.home <dd>Java installation directory
758 * <dt>java.vm.specification.version <dd>VM Spec version
759 * <dt>java.vm.specification.vendor <dd>VM Spec vendor
760 * <dt>java.vm.specification.name <dd>VM Spec name
761 * <dt>java.vm.version <dd>VM implementation version
762 * <dt>java.vm.vendor <dd>VM implementation vendor
763 * <dt>java.vm.name <dd>VM implementation name
764 * <dt>java.specification.version <dd>Java Runtime Environment version
765 * <dt>java.specification.vendor <dd>Java Runtime Environment vendor
766 * <dt>java.specification.name <dd>Java Runtime Environment name
767 * <dt>java.class.version <dd>Java class version number
768 * <dt>java.class.path <dd>Java classpath
769 * <dt>java.library.path <dd>Path for finding Java libraries
770 * <dt>java.io.tmpdir <dd>Default temp file path
771 * <dt>java.compiler <dd>Name of JIT to use
772 * <dt>java.ext.dirs <dd>Java extension path
773 * <dt>os.name <dd>Operating System Name
774 * <dt>os.arch <dd>Operating System Architecture
775 * <dt>os.version <dd>Operating System Version
776 * <dt>file.separator <dd>File separator ("/" on Unix)
777 * <dt>path.separator <dd>Path separator (":" on Unix)
778 * <dt>line.separator <dd>Line separator ("\n" on Unix)
779 * <dt>user.name <dd>User account name
780 * <dt>user.home <dd>User home directory
781 * <dt>user.dir <dd>User's current working directory
782 * </dl>
784 * @param p the Properties object to insert the system properties into
786 static native void insertSystemProperties(Properties p);
787 } // class Runtime