You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by bl...@apache.org on 2002/02/11 23:04:15 UTC
cvs commit: jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/util SystemUtil.java
bloritsch 02/02/11 14:04:15
Modified: src/scratchpad/org/apache/avalon/excalibur/util
SystemUtil.java
Log:
add default to property values then system defaults
Revision Changes Path
1.2 +9 -4 jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/util/SystemUtil.java
Index: SystemUtil.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/util/SystemUtil.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SystemUtil.java 11 Feb 2002 21:37:24 -0000 1.1
+++ SystemUtil.java 11 Feb 2002 22:04:15 -0000 1.2
@@ -16,7 +16,7 @@
* Windows support.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/02/11 21:37:24 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/02/11 22:04:15 $
*/
public final class SystemUtil
{
@@ -43,9 +43,14 @@
procs = parser.numProcessors();
info = parser.cpuInfo();
} catch (Exception e) {
- procs = 1; // assume only one processor if we don't have any other
- // method of telling
- info = m_architecture + " Family n, Model n, Stepping n, Undeterminable";
+ String proc = System.getProperty( "os.arch.cpus", "1" );
+ info = System.getProperty(
+ "os.arch.info",
+ m_architecture +
+ " Family n, Model n, Stepping n, Undeterminable"
+ );
+
+ procs = Integer.parseInt( proc );
}
m_processors = procs;
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>