|
From: <ls...@us...> - 2007-06-23 05:10:38
|
Revision: 3296
http://jnode.svn.sourceforge.net/jnode/?rev=3296&view=rev
Author: lsantha
Date: 2007-06-22 22:10:37 -0700 (Fri, 22 Jun 2007)
Log Message:
-----------
Openjdk integration.
Modified Paths:
--------------
trunk/core/src/classpath/java/java/lang/System.java
Modified: trunk/core/src/classpath/java/java/lang/System.java
===================================================================
--- trunk/core/src/classpath/java/java/lang/System.java 2007-06-23 05:04:10 UTC (rev 3295)
+++ trunk/core/src/classpath/java/java/lang/System.java 2007-06-23 05:10:37 UTC (rev 3296)
@@ -44,6 +44,7 @@
import java.io.InputStream;
import java.io.PrintStream;
+import java.io.Console;
import java.util.AbstractCollection;
import java.util.Collection;
import java.util.Collections;
@@ -1086,4 +1087,23 @@
} // class EnvironmentSet<String>
+ //jnode
+ private static volatile Console cons = null;
+ /**
+ * Returns the unique {@link java.io.Console Console} object associated
+ * with the current Java virtual machine, if any.
+ *
+ * @return The system console, if any, otherwise <tt>null</tt>.
+ *
+ * @since 1.6
+ */
+ public static Console console() {
+ if (cons == null) {
+ synchronized (System.class) {
+ cons = sun.misc.SharedSecrets.getJavaIOAccess().console();
+ }
+ }
+ return cons;
+ }
+
} // class System
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|