You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/04/14 17:05:24 UTC
svn commit: r764817 -
/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/JavaVersion.java
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"))