Changeset 7349 in josm for trunk/src/org
- Timestamp:
- 2014-07-31T01:57:53+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r7343 r7349 133 133 try { 134 134 boolean dpkg = Files.exists(Paths.get("/usr/bin/dpkg-query")); 135 boolean eque = Files.exists(Paths.get("/usr/bin/equery")); 135 136 boolean rpm = Files.exists(Paths.get("/bin/rpm")); 136 if (dpkg || rpm ) {137 if (dpkg || rpm || eque) { 137 138 for (String packageName : packageNames) { 138 139 String[] args = null; 139 140 if (dpkg) { 140 141 args = new String[] {"dpkg-query", "--show", "--showformat", "${Architecture}-${Version}", packageName}; 142 } else if (eque) { 143 args = new String[] {"equery", "-q", "list", "-e", "--format=$fullversion", packageName}; 141 144 } else { 142 145 args = new String[] {"rpm", "-q", "--qf", "%{arch}-%{version}", packageName}; … … 164 167 public String getJavaPackageDetails() { 165 168 String home = System.getProperty("java.home"); 166 if (home.contains("java-7-openjdk") || home.contains("java-1.7.0-openjdk")) {169 if (home.contains("java-7-openjdk") || home.contains("java-1.7.0-openjdk")) { 167 170 return getPackageDetails("openjdk-7-jre", "java-1_7_0-openjdk", "java-1.7.0-openjdk"); 171 } else if (home.contains("icedtea")) { 172 return getPackageDetails("icedtea-bin"); 173 } else if (home.contains("oracle")) { 174 return getPackageDetails("oracle-jdk-bin", "oracle-jre-bin"); 168 175 } 169 176 return null;
Note:
See TracChangeset
for help on using the changeset viewer.