Changeset 6943 in josm
- Timestamp:
- 2014-03-29T15:24:48+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r6851 r6943 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 && ( 54 os.startsWith("10.7.") || os.startsWith("10.8") || os.startsWith("10.9"))) { 55 askUpdateJava(java); 49 56 } 50 57 } -
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r6920 r6943 40 40 @Override 41 41 public void startupHook() { 42 if (isDebianOrUbuntu()) { 43 // Invite users to install Java 7 if they are still with Java 6 and using a compatible distrib (Debian >= 7 or Ubuntu >= 12.04) 44 String java = System.getProperty("java.version"); 45 String os = getOSDescription(); 46 if (java != null && java.startsWith("1.6") && os != null && ( 47 os.startsWith("Linux Debian GNU/Linux 7") || 48 os.startsWith("Linux Ubuntu 12") || os.startsWith("Linux Ubuntu 13") || os.startsWith("Linux Ubuntu 14"))) { 49 askUpdateJava(java, "apt://openjdk-7-jre"); 50 } 51 } 42 52 } 43 53 … … 325 335 326 336 protected void askUpdateJava(String version) { 337 askUpdateJava(version, "https://www.java.com/download"); 338 } 339 340 protected void askUpdateJava(String version, String url) { 327 341 try { 328 342 ExtendedDialog ed = new ExtendedDialog( … … 333 347 if (!ed.toggleEnable("askUpdateJava7").toggleCheckState()) { 334 348 ed.setButtonIcons(new String[]{"java.png", "cancel.png"}).setCancelButton(2); 335 ed.setMinimumSize(new Dimension(4 60, 260));349 ed.setMinimumSize(new Dimension(480, 300)); 336 350 ed.setIcon(JOptionPane.WARNING_MESSAGE); 337 ed.setContent(tr("You are running version {0} of Java.", "<b>"+version+"</b>")+"<br><br>"+ 338 "<b>"+tr("This version is no longer supported by {0} since {1} and is not recommended for use.", "Oracle", tr("February 2013"))+"</b><br><br>"+ 339 "<b>"+tr("JOSM will soon stop working with this version; we highly recommend you to update to Java {0}.", "7")+"</b><br><br>"+ 340 tr("Would you like to update now ?")); 351 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.", 354 "Oracle", tr("February 2013"))+"</b><br><br>"; 355 } 356 content += "<b>"+tr("JOSM will soon stop working with this version; we highly recommend you to update to Java {0}.", "7")+"</b><br><br>"+ 357 tr("Would you like to update now ?"); 358 ed.setContent(content); 341 359 342 360 if (ed.showDialog().getValue() == 1) { 343 openUrl( "https://www.java.com/download");361 openUrl(url); 344 362 } 345 363 } -
trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
r6443 r6943 39 39 @Override 40 40 public void startupHook() { 41 super.startupHook(); 42 // Invite users to install Oracle Java 7 if they are still with Sun/Oracle Java 6 43 String vendor = System.getProperty("java.vendor"); 41 // Invite users to install Java 7 if they are still with Java 6 44 42 String version = System.getProperty("java.version"); 45 if ( "Sun Microsystems Inc.".equals(vendor) &&version != null && version.startsWith("1.6")) {43 if (version != null && version.startsWith("1.6")) { 46 44 askUpdateJava(version); 47 45 }
Note:
See TracChangeset
for help on using the changeset viewer.