Changeset 6951 in josm for trunk/src/org
- Timestamp:
- 2014-03-31T15:03:38+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r6943 r6951 45 45 String os = getOSDescription(); 46 46 if (java != null && java.startsWith("1.6") && os != null && ( 47 os.startsWith("Linux Debian GNU/Linux 7") || 47 os.startsWith("Linux Debian GNU/Linux 7") || 48 48 os.startsWith("Linux Ubuntu 12") || os.startsWith("Linux Ubuntu 13") || os.startsWith("Linux Ubuntu 14"))) { 49 49 askUpdateJava(java, "apt://openjdk-7-jre"); … … 134 134 135 135 /** 136 * Determines if the JVM is OpenJDK-based. 137 * @return {@code true} if {@code java.home} contains "openjdk", {@code false} otherwise 138 * @since 6951 139 */ 140 public static boolean isOpenJDK() { 141 String javaHome = System.getProperty("java.home"); 142 return javaHome != null && javaHome.contains("openjdk"); 143 } 144 145 /** 136 146 * Get the package name including detailed version. 137 147 * @param packageName The package name … … 191 201 */ 192 202 public String getWebStartPackageDetails() { 193 if (isDebianOrUbuntu()) { 194 String javaHome = System.getProperty("java.home"); 195 if (javaHome != null && javaHome.contains("openjdk")) { 196 return getPackageDetails("icedtea-netx"); 197 } 203 if (isDebianOrUbuntu() && isOpenJDK()) { 204 return getPackageDetails("icedtea-netx"); 198 205 } 199 206 return null; … … 350 357 ed.setIcon(JOptionPane.WARNING_MESSAGE); 351 358 String content = tr("You are running version {0} of Java.", "<b>"+version+"</b>")+"<br><br>"; 352 if ("Sun Microsystems Inc.".equals(System.getProperty("java.vendor")) ) {353 content += "<b>"+tr("This version is no longer supported by {0} since {1} and is not recommended for use.", 359 if ("Sun Microsystems Inc.".equals(System.getProperty("java.vendor")) && !isOpenJDK()) { 360 content += "<b>"+tr("This version is no longer supported by {0} since {1} and is not recommended for use.", 354 361 "Oracle", tr("February 2013"))+"</b><br><br>"; 355 362 }
Note:
See TracChangeset
for help on using the changeset viewer.