Changeset 7001 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2014-04-26T03:53:35+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r6977 r7001 47 47 // We'll just ignore this for now. The user will still be able to close JOSM by closing all its windows. 48 48 Main.warn("Failed to register with OSX: " + ex); 49 }50 // Invite users to install Java 7 if they are still with Java 6 and using a compatible OS X version (>= 10.7.3)51 String java = System.getProperty("java.version");52 String os = System.getProperty("os.version");53 if (java != null && java.startsWith("1.6") && os != null && os.matches("^10\\.[789].*")) {54 askUpdateJava(java);55 49 } 56 50 } -
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r6997 r7001 16 16 import java.net.URISyntaxException; 17 17 import java.util.Arrays; 18 import java.util.Calendar;19 18 20 19 import javax.swing.JOptionPane; … … 42 41 @Override 43 42 public void startupHook() { 44 if (isDebianOrUbuntu()) {45 // Invite users to install Java 7 if they are still with Java 6 and using a compatible distrib (Debian >= 7 or Ubuntu >= 12.04)46 String java = System.getProperty("java.version");47 String os = getOSDescription();48 if (java != null && java.startsWith("1.6") && os != null && (49 os.startsWith("Linux Debian GNU/Linux 7") || os.startsWith("Linux Mint") || os.matches("^Linux Ubuntu 1[234].*"))) {50 String url;51 // apturl does not exist on Debian (see #8465)52 if (os.startsWith("Linux Debian")) {53 url = "https://packages.debian.org/stable/openjdk-7-jre";54 } else if (getPackageDetails("apturl") != null) {55 url = "apt://openjdk-7-jre";56 } else if (os.startsWith("Linux Mint")) {57 url = "http://community.linuxmint.com/software/view/openjdk-7-jre";58 } else {59 url = "http://packages.ubuntu.com/trusty/openjdk-7-jre";60 }61 askUpdateJava(java, url);62 }63 }64 43 } 65 44 … … 360 339 } 361 340 341 // Method kept because strings have already been translated. To enable for Java 8 migration somewhere in 2016 362 342 protected void askUpdateJava(final String version, final String url) { 363 // Expiration date of this feature around the expected release of our first Java 7 tested version364 Calendar today = Calendar.getInstance();365 Calendar expiration = Calendar.getInstance();366 expiration.set(2014, Calendar.MAY, 25);367 if (!today.before(expiration)) {368 return;369 }370 343 GuiHelper.runInEDTAndWait(new Runnable() { 371 344 @Override … … 376 349 new String[]{tr("Update Java"), tr("Cancel")}); 377 350 // Check if the dialog has not already been permanently hidden by user 378 if (!ed.toggleEnable("askUpdateJava 7").toggleCheckState()) {351 if (!ed.toggleEnable("askUpdateJava8").toggleCheckState()) { 379 352 ed.setButtonIcons(new String[]{"java.png", "cancel.png"}).setCancelButton(2); 380 353 ed.setMinimumSize(new Dimension(480, 300)); … … 383 356 if ("Sun Microsystems Inc.".equals(System.getProperty("java.vendor")) && !isOpenJDK()) { 384 357 content += "<b>"+tr("This version is no longer supported by {0} since {1} and is not recommended for use.", 385 "Oracle", tr(" February 2013"))+"</b><br><br>";358 "Oracle", tr("April 2015"))+"</b><br><br>"; 386 359 } 387 content += "<b>"+tr("JOSM will soon stop working with this version; we highly recommend you to update to Java {0}.", " 7")+"</b><br><br>"+360 content += "<b>"+tr("JOSM will soon stop working with this version; we highly recommend you to update to Java {0}.", "8")+"</b><br><br>"+ 388 361 tr("Would you like to update now ?"); 389 362 ed.setContent(content); -
trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
r6943 r7001 36 36 */ 37 37 public class PlatformHookWindows extends PlatformHookUnixoid implements PlatformHook { 38 39 @Override40 public void startupHook() {41 // Invite users to install Java 7 if they are still with Java 642 String version = System.getProperty("java.version");43 if (version != null && version.startsWith("1.6")) {44 askUpdateJava(version);45 }46 }47 38 48 39 @Override
Note:
See TracChangeset
for help on using the changeset viewer.