commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r764817 - /commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/JavaVersion.java
Date Tue, 14 Apr 2009 15:05:24 GMT
Author: mturk
Date: Tue Apr 14 15:05:23 2009
New Revision: 764817

URL: http://svn.apache.org/viewvc?rev=764817&view=rev
Log:
For Mac/Intel/64 return x86_64 for processor

Modified:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/JavaVersion.java

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/JavaVersion.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/JavaVersion.java?rev=764817&r1=764816&r2=764817&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/JavaVersion.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/JavaVersion.java
Tue Apr 14 15:05:23 2009
@@ -64,6 +64,7 @@
     public String getProcessor()
     {
         String cpu;
+        String name = props.getProperty("os.name");
         String arch = props.getProperty("os.arch");
         String data = props.getProperty("sun.arch.data.model");
 
@@ -73,8 +74,13 @@
         if (data == null) {
             data = "32";
         }
-        if (arch.endsWith("86"))
-            cpu = "ia" + data;
+        if (arch.endsWith("86")) {
+            cpu = "ia32";
+            if (name.startsWith("Mac OS")) {
+                if (data.equals("64"))
+                    cpu = "x86_64";
+            }
+        }
         else if (arch.startsWith("PA_RISC"))
             cpu = "pa" + data;
         else if (arch.startsWith("IA64"))



Mime
View raw message