Ignore:
Timestamp:
2014-04-26T03:53:35+02:00 (10 years ago)
Author:
Don-vip
Message:

see #8465 - switch core to Java 7

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java

    r6977 r7001  
    4747            // We'll just ignore this for now. The user will still be able to close JOSM by closing all its windows.
    4848            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);
    5549        }
    5650    }
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java

    r6997 r7001  
    1616import java.net.URISyntaxException;
    1717import java.util.Arrays;
    18 import java.util.Calendar;
    1918
    2019import javax.swing.JOptionPane;
     
    4241    @Override
    4342    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         }
    6443    }
    6544
     
    360339    }
    361340
     341    // Method kept because strings have already been translated. To enable for Java 8 migration somewhere in 2016
    362342    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 version
    364         Calendar today = Calendar.getInstance();
    365         Calendar expiration = Calendar.getInstance();
    366         expiration.set(2014, Calendar.MAY, 25);
    367         if (!today.before(expiration)) {
    368             return;
    369         }
    370343        GuiHelper.runInEDTAndWait(new Runnable() {
    371344            @Override
     
    376349                        new String[]{tr("Update Java"), tr("Cancel")});
    377350                // Check if the dialog has not already been permanently hidden by user
    378                 if (!ed.toggleEnable("askUpdateJava7").toggleCheckState()) {
     351                if (!ed.toggleEnable("askUpdateJava8").toggleCheckState()) {
    379352                    ed.setButtonIcons(new String[]{"java.png", "cancel.png"}).setCancelButton(2);
    380353                    ed.setMinimumSize(new Dimension(480, 300));
     
    383356                    if ("Sun Microsystems Inc.".equals(System.getProperty("java.vendor")) && !isOpenJDK()) {
    384357                        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>";
    386359                    }
    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>"+
    388361                            tr("Would you like to update now ?");
    389362                    ed.setContent(content);
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java

    r6943 r7001  
    3636  */
    3737public class PlatformHookWindows extends PlatformHookUnixoid implements PlatformHook {
    38    
    39     @Override
    40     public void startupHook() {
    41         // Invite users to install Java 7 if they are still with Java 6
    42         String version = System.getProperty("java.version");
    43         if (version != null && version.startsWith("1.6")) {
    44             askUpdateJava(version);
    45         }
    46     }
    4738
    4839    @Override
Note: See TracChangeset for help on using the changeset viewer.