- Timestamp:
- 2014-07-19T21:12:28+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r7027 r7318 86 86 text.append("\n"); 87 87 if (Main.platform.getClass() == PlatformHookUnixoid.class) { 88 // Add Java package details for Debian/Ubuntu88 // Add Java package details 89 89 String packageDetails = ((PlatformHookUnixoid) Main.platform).getJavaPackageDetails(); 90 90 if (packageDetails != null) { … … 93 93 text.append("\n"); 94 94 } 95 // Add WebStart package details for Debian/Ubuntu,if run from JNLP95 // Add WebStart package details if run from JNLP 96 96 if (Package.getPackage("javax.jnlp") != null) { 97 97 String webStartDetails = ((PlatformHookUnixoid) Main.platform).getWebStartPackageDetails(); -
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r7315 r7318 133 133 try { 134 134 boolean dpkg = Files.exists(Paths.get("/usr/bin/dpkg-query")); 135 boolean rpm = Files.exists(Paths.get("/ usr/bin/rpm"));135 boolean rpm = Files.exists(Paths.get("/bin/rpm")); 136 136 if (dpkg || rpm) { 137 137 for (String packageName : packageNames) { … … 143 143 } 144 144 String version = Utils.execOutput(Arrays.asList(args)); 145 if (version != null ) {145 if (version != null && !version.contains("not installed")) { 146 146 return packageName + ":" + version; 147 147 } … … 163 163 */ 164 164 public String getJavaPackageDetails() { 165 switch(System.getProperty("java.home")) { 166 case "/usr/lib/jvm/java-7-openjdk-amd64/jre": 167 case "/usr/lib/jvm/java-7-openjdk-i386/jre": 168 case "/usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/jre": 169 case "/usr/lib/jvm/java-1.7.0-openjdk-1.7.0/jre": 170 return getPackageDetails("openjdk-7-jre", "java-1_7_0-openjdk"); 165 String home = System.getProperty("java.home"); 166 if(home.contains("java-7-openjdk") || home.contains("java-1.7.0-openjdk")) { 167 return getPackageDetails("openjdk-7-jre", "java-1_7_0-openjdk", "java-1.7.0-openjdk"); 171 168 } 172 169 return null;
Note:
See TracChangeset
for help on using the changeset viewer.