Changeset 10580 in josm


Ignore:
Timestamp:
2016-07-21T01:57:41+02:00 (13 months ago)
Author:
Don-vip
Message:

see #11390 - switch to Java 8

Location:
trunk
Files:
1 deleted
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/.classpath

    r10555 r10580  
    2020        <classpathentry kind="lib" path="test/lib/equalsverifier-2.1.3.jar"/>
    2121        <classpathentry kind="lib" path="test/lib/reflections/reflections-0.9.10.jar"/>
    22         <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7.0_80"/>
     22        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_102"/>
    2323        <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
    2424        <classpathentry kind="lib" path="test/lib/unitils-core/commons-collections-3.2.jar"/>
  • trunk/.settings/org.eclipse.jdt.core.prefs

    r10283 r10580  
    88org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
    99org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
    10 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
     10org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
    1111org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
    12 org.eclipse.jdt.core.compiler.compliance=1.7
     12org.eclipse.jdt.core.compiler.compliance=1.8
    1313org.eclipse.jdt.core.compiler.debug.lineNumber=generate
    1414org.eclipse.jdt.core.compiler.debug.localVariable=generate
     
    100100org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
    101101org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
     102org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
    102103org.eclipse.jdt.core.compiler.problem.unusedImport=warning
    103104org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
     
    112113org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
    113114org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
    114 org.eclipse.jdt.core.compiler.source=1.7
     115org.eclipse.jdt.core.compiler.source=1.8
    115116org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
    116117org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
  • trunk/.settings/sf.eclipse.javacc.prefs

    r8632 r10580  
    11CLEAR_CONSOLE=true
    2 JAVACC_OPTIONS=-JDK_VERSION\=1.7 -GRAMMAR_ENCODING\=UTF-8
     2JAVACC_OPTIONS=-JDK_VERSION\=1.8 -GRAMMAR_ENCODING\=UTF-8
    33JJDOC_OPTIONS=
    44JJTREE_OPTIONS=
  • trunk/README

    r10456 r10580  
    1010
    1111* The JOSM .jar file, e.g., josm-tested.jar or josm-latest.jar
    12 * Java Runtime Environment (JRE) 7, or later.
     12* Java Runtime Environment (JRE) 8, or later.
    1313
    1414
    1515How to get Java Runtime Environment
    1616-----------------------------------
    17 You need JRE Version 7, or later.
     17You need JRE Version 8, or later.
    1818
    1919Microsoft Windows and Apple Mac OS X users should visit https://www.java.com
     
    117117    - animal-sniffer-ant-tasks-1.14.jar
    118118                            used to build and check code signatures to ensure plugins binary compatibility
    119     - appbundler-1.0ea.jar  used to build Mac OS X package for Oracle Java 7
     119    - appbundler-1.0ea.jar  used to build Mac OS X package
    120120    - checkstyle/           libs and config files for checkstyle (automatically detects code style
    121121                            problems in source code); can be launched as an ant target in build.xml
  • trunk/build.xml

    r10546 r10580  
    212212            <arg value="-DEBUG_PARSER=false"/>
    213213            <arg value="-DEBUG_TOKEN_MANAGER=false"/>
    214             <arg value="-JDK_VERSION=1.7"/>
     214            <arg value="-JDK_VERSION=1.8"/>
    215215            <arg value="-GRAMMAR_ENCODING=UTF-8"/>
    216216            <arg value="-OUTPUT_DIRECTORY=${mapcss.dir}/parsergen"/>
     
    221221        <!-- COTS -->
    222222        <javac srcdir="${src.dir}" includes="com/**,oauth/**,org/apache/commons/**,org/glassfish/**" nowarn="on" encoding="iso-8859-1"
    223             destdir="build" target="1.7" source="1.7" debug="on" includeAntRuntime="false" createMissingPackageInfoClass="false">
     223            destdir="build" target="1.8" source="1.8" debug="on" includeAntRuntime="false" createMissingPackageInfoClass="false">
    224224            <!-- get rid of "internal proprietary API" warning -->
    225225            <compilerarg value="-XDignore.symbol.file"/>
     
    245245        <!-- JMapViewer -->
    246246        <javac sourcepath="" srcdir="${src.dir}" excludes="com/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/openstreetmap/gui/jmapviewer/Demo.java,org/openstreetmap/josm/**,JOSM.java,gnu/**"
    247             destdir="build" target="1.7" source="1.7" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
     247            destdir="build" target="1.8" source="1.8" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
    248248            <compilerarg value="-Xlint:cast"/>
    249249            <compilerarg value="-Xlint:deprecation"/>
     
    262262        <!-- JOSM -->
    263263        <javac sourcepath="" srcdir="${src.dir}" excludes="com/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/openstreetmap/gui/jmapviewer/Demo.java"
    264             destdir="build" target="1.7" source="1.7" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
     264            destdir="build" target="1.8" source="1.8" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
    265265            <compilerarg value="-Xlint:cast"/>
    266266            <compilerarg value="-Xlint:deprecation"/>
     
    300300                linksource="true"
    301301                author="false">
    302             <link href="http://docs.oracle.com/javase/7/docs/api"/>
     302            <link href="http://docs.oracle.com/javase/8/docs/api"/>
    303303            <doctitle><![CDATA[<h2>JOSM - Javadoc</h2>]]></doctitle>
    304304            <bottom><![CDATA[<a href="https://josm.openstreetmap.de/">JOSM</a>]]></bottom>
     
    353353                    <cp-elements/>
    354354                </classpath>
    355                 <javac target="1.7" source="1.7" debug="on" encoding="UTF-8">
     355                <javac target="1.8" source="1.8" debug="on" encoding="UTF-8">
    356356                    <compilerarg value="-Xlint:all"/>
    357357                    <compilerarg value="-Xlint:-serial"/>
     
    704704        <mkdir dir="${proj-build.dir}"/>
    705705        <javac sourcepath="" srcdir="${base.dir}/scripts" failonerror="true"
    706             destdir="${proj-build.dir}" target="1.7" source="1.7" debug="on"
     706            destdir="${proj-build.dir}" target="1.8" source="1.8" debug="on"
    707707            includeantruntime="false" createMissingPackageInfoClass="false"
    708708            encoding="UTF-8" classpath="${proj-classpath}">
  • trunk/josm-latest.jnlp

    r7001 r10580  
    2020    </security>
    2121    <resources>
    22         <j2se version="1.7+"/>
     22        <java version="1.8+"/>
    2323        <jar href="josm-latest.jar"/>
    2424        <property name="java.util.Arrays.useLegacyMergeSort" value="true"/>
  • trunk/josm.jnlp

    r7363 r10580  
    2020    </security>
    2121    <resources>
    22         <j2se version="1.7+"/>
     22        <java version="1.8+"/>
    2323        <jar href="josm-tested.jar"/>
    2424        <property name="java.util.Arrays.useLegacyMergeSort" value="true"/>
  • trunk/linux/latest/DEBIAN/control

    r9237 r10580  
    66Priority: extra
    77Architecture: all
    8 Depends: openjdk-8-jre | java7-runtime
     8Depends: openjdk-8-jre | java8-runtime
    99Description: Editor for OpenStreetMap (daily development snapshot)
    1010 JOSM is an editor for OpenStreetMap (OSM) written in Java.
  • trunk/linux/latest/usr/bin/josm-latest

    r10430 r10580  
    33set -e
    44
    5 # First, users preference as defined by $JAVA_HOME. Next, use OpenJDK or Oracle's proprietary JDK.
     5# First, the alternative (if known to work) or users preference as defined by $JAVA_HOME. Next, use OpenJDK or Oracle's proprietary JDK.
    66# Override to a specific one using $JAVACMD
     7ALTERNATIVE_JDK="`readlink -n -f /etc/alternatives/java`"
     8
    79# Let's get the current architecture -- needed for multiarchified Java
    810ARCH="`dpkg --print-architecture 2> /dev/null || true`"
     
    1214        JAVA_CMDS="$JAVA_HOME/bin/java"
    1315        JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-8-openjdk/bin/java /usr/lib/jvm/java-8-openjdk-$ARCH/bin/java /usr/lib/jvm/java-8-oracle/bin/java"
    14         JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-7-openjdk/bin/java /usr/lib/jvm/java-7-openjdk-$ARCH/bin/java /usr/lib/jvm/java-7-oracle/bin/java"
    1516        JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-9-openjdk/bin/java /usr/lib/jvm/java-9-openjdk-$ARCH/bin/java /usr/lib/jvm/java-9-oracle/bin/java"
    1617else
    1718        JAVA_CMDS="$JAVA_HOME/bin/java /usr/bin/java"
    1819        JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-8-oracle/bin/java"
    19         JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-7-oracle/bin/java"
    2020        JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-9-oracle/bin/java"
    2121fi
     
    2626
    2727JAVA_OPTS="-Djosm.restart=true -Djosm.home=$HOME/.josm-latest -Djava.net.useSystemProxies=true $JAVA_OPTS"
     28
     29if [ -z "${JAVACMD}" ]; then
     30    for jcmd in $JAVA_CMDS; do
     31        if [ "z$ALTERNATIVE_JDK" = "z`readlink -n -f $jcmd`" ] && [ -z "${JAVACMD}" ]; then
     32            JAVACMD="$jcmd"
     33            break
     34        fi
     35    done
     36fi
    2837
    2938if [ -z "${JAVACMD}" ]; then
  • trunk/linux/latest/usr/share/man/man1/josm-latest.1

    r7843 r10580  
    1 .TH JOSM 1 "December 20, 2014"
     1.TH JOSM 1 "July 21, 2016"
    22.\" Please adjust this date whenever revising the manpage.
    33.SH NAME
     
    77.SH DESCRIPTION
    88.B JOSM
    9 is an editor for OpenStreetMap written in Java 7.
     9is an editor for OpenStreetMap written in Java 8.
    1010.PP
    1111.B OpenStreetMap
  • trunk/linux/tested/DEBIAN/control

    r9237 r10580  
    66Priority: extra
    77Architecture: all
    8 Depends: openjdk-8-jre | java7-runtime
     8Depends: openjdk-8-jre | java8-runtime
    99Conflicts: josm-plugins
    1010Replaces: josm-plugins
  • trunk/linux/tested/usr/bin/josm

    r10430 r10580  
    33set -e
    44
    5 # First, users preference as defined by $JAVA_HOME. Next, use OpenJDK or Oracle's proprietary JDK.
     5# First, the alternative (if known to work) or users preference as defined by $JAVA_HOME. Next, use OpenJDK or Oracle's proprietary JDK.
    66# Override to a specific one using $JAVACMD
     7ALTERNATIVE_JDK="`readlink -n -f /etc/alternatives/java`"
     8
    79# Let's get the current architecture -- needed for multiarchified Java
    810ARCH="`dpkg --print-architecture 2> /dev/null || true`"
     
    1214        JAVA_CMDS="$JAVA_HOME/bin/java"
    1315        JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-8-openjdk/bin/java /usr/lib/jvm/java-8-openjdk-$ARCH/bin/java /usr/lib/jvm/java-8-oracle/bin/java"
    14         JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-7-openjdk/bin/java /usr/lib/jvm/java-7-openjdk-$ARCH/bin/java /usr/lib/jvm/java-7-oracle/bin/java"
    1516        JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-9-openjdk/bin/java /usr/lib/jvm/java-9-openjdk-$ARCH/bin/java /usr/lib/jvm/java-9-oracle/bin/java"
    1617else
    1718        JAVA_CMDS="$JAVA_HOME/bin/java /usr/bin/java"
    1819        JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-8-oracle/bin/java"
    19         JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-7-oracle/bin/java"
    2020        JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-9-oracle/bin/java"
    2121fi
     
    2626
    2727JAVA_OPTS="-Djosm.restart=true -Djava.net.useSystemProxies=true $JAVA_OPTS"
     28
     29if [ -z "${JAVACMD}" ]; then
     30    for jcmd in $JAVA_CMDS; do
     31        if [ "z$ALTERNATIVE_JDK" = "z`readlink -n -f $jcmd`" ] && [ -z "${JAVACMD}" ]; then
     32            JAVACMD="$jcmd"
     33            break
     34        fi
     35    done
     36fi
    2837
    2938if [ -z "${JAVACMD}" ]; then
  • trunk/linux/tested/usr/share/man/man1/josm.1

    r7843 r10580  
    1 .TH JOSM 1 "December 20, 2014"
     1.TH JOSM 1 "July 21, 2016"
    22.\" Please adjust this date whenever revising the manpage.
    33.SH NAME
     
    77.SH DESCRIPTION
    88.B JOSM
    9 is an editor for OpenStreetMap written in Java 7.
     9is an editor for OpenStreetMap written in Java 8.
    1010.PP
    1111.B OpenStreetMap
  • trunk/netbeans/nbproject/project.properties

    r10203 r10580  
    6161javac.processorpath=\
    6262    ${javac.classpath}
    63 javac.source=1.7
    64 javac.target=1.7
     63javac.source=1.8
     64javac.target=1.8
    6565javac.test.classpath=\
    6666    ${javac.classpath}:\
  • trunk/src/org/openstreetmap/josm/Main.java

    r10507 r10580  
    10521052        UIManager.put("OptionPane.noIcon", UIManager.get("OptionPane.cancelIcon"));
    10531053        // Ensures caret color is the same than text foreground color, see #12257
    1054         // See http://docs.oracle.com/javase/7/docs/api/javax/swing/plaf/synth/doc-files/componentProperties.html
     1054        // See http://docs.oracle.com/javase/8/docs/api/javax/swing/plaf/synth/doc-files/componentProperties.html
    10551055        for (String p : Arrays.asList(
    10561056                "EditorPane", "FormattedTextField", "PasswordField", "TextArea", "TextField", "TextPane")) {
     
    13371337
    13381338    /**
    1339      * Determines if JOSM currently runs with Java 8 or later.
    1340      * @return {@code true} if the current JVM is at least Java 8, {@code false} otherwise
    1341      * @since 7894
    1342      */
    1343     public static boolean isJava8orLater() {
    1344         String version = System.getProperty("java.version");
    1345         return version != null && !version.matches("^(1\\.)?[7].*");
    1346     }
    1347 
    1348     /**
    1349      * Checks that JOSM is at least running with Java 7.
     1339     * Checks that JOSM is at least running with Java 8.
    13501340     * @since 7001
    13511341     */
     
    13531343        String version = System.getProperty("java.version");
    13541344        if (version != null) {
    1355             if (version.matches("^(1\\.)?[789].*"))
     1345            if (version.matches("^(1\\.)?[89].*"))
    13561346                return;
    1357             if (version.matches("^(1\\.)?[56].*")) {
     1347            if (version.matches("^(1\\.)?[567].*")) {
    13581348                JMultilineLabel ho = new JMultilineLabel("<html>"+
    13591349                        tr("<h2>JOSM requires Java version {0}.</h2>"+
     
    13611351                                "You can <ul><li>update your Java (JRE) or</li>"+
    13621352                                "<li>use an earlier (Java {2} compatible) version of JOSM.</li></ul>"+
    1363                                 "More Info:", "7", version, "6")+"</html>");
     1353                                "More Info:", "8", version, "7")+"</html>");
    13641354                JTextArea link = new JTextArea(HelpUtil.getWikiBaseHelpUrl()+"/Help/SystemRequirements");
    13651355                link.setEditable(false);
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r10469 r10580  
    13361336            Utils.updateSystemProperty("jsse.enableSNIExtension", "false");
    13371337        }
    1338         // Workaround to fix another Java bug - The bug seems to have been fixed in Java 8, to remove during transition
    1339         // Force Java 7 to use old sorting algorithm of Arrays.sort (fix #8712).
    1340         // See Oracle bug database: https://bugs.openjdk.java.net/browse/JDK-7075600
    1341         // and https://bugs.openjdk.java.net/browse/JDK-6923200
    1342         if (getBoolean("jdk.Arrays.useLegacyMergeSort", !Version.getInstance().isLocalBuild())) {
    1343             Utils.updateSystemProperty("java.util.Arrays.useLegacyMergeSort", "true");
    1344         }
    13451338    }
    13461339
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java

    r10308 r10580  
    4646import sun.security.x509.CertificateAlgorithmId;
    4747import sun.security.x509.CertificateExtensions;
    48 import sun.security.x509.CertificateIssuerName;
    4948import sun.security.x509.CertificateSerialNumber;
    50 import sun.security.x509.CertificateSubjectName;
    5149import sun.security.x509.CertificateValidity;
    5250import sun.security.x509.CertificateVersion;
     
    149147        info.set(X509CertInfo.VALIDITY, interval);
    150148        info.set(X509CertInfo.SERIAL_NUMBER, new CertificateSerialNumber(sn));
    151 
    152         // Change of behaviour in JDK8:
    153         // https://bugs.openjdk.java.net/browse/JDK-8040820
    154         // https://bugs.openjdk.java.net/browse/JDK-7198416
    155         if (!Main.isJava8orLater()) {
    156             // Java 7 code. To remove with Java 8 migration
    157             info.set(X509CertInfo.SUBJECT, new CertificateSubjectName(owner));
    158             info.set(X509CertInfo.ISSUER, new CertificateIssuerName(owner));
    159         } else {
    160             // Java 8 and later code
    161             info.set(X509CertInfo.SUBJECT, owner);
    162             info.set(X509CertInfo.ISSUER, owner);
    163         }
     149        info.set(X509CertInfo.SUBJECT, owner);
     150        info.set(X509CertInfo.ISSUER, owner);
    164151
    165152        info.set(X509CertInfo.KEY, new CertificateX509Key(pair.getPublic()));
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r10485 r10580  
    10261026                    // This can be removed if someday Oracle fixes https://bugs.openjdk.java.net/browse/JDK-6788458
    10271027                    // CHECKSTYLE.OFF: LineLength
    1028                     // hg.openjdk.java.net/jdk7u/jdk7u/jdk/file/828c4fedd29f/src/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java#l656
     1028                    // hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/dc4322602480/src/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java#l656
    10291029                    // CHECKSTYLE.ON: LineLength
    10301030                    Image img = read(new ByteArrayInputStream(bytes), false, true);
     
    11511151                // See #10479: for PNG files, always enforce transparency to be sure tNRS chunk is used even not in paletted mode
    11521152                // This can be removed if someday Oracle fixes https://bugs.openjdk.java.net/browse/JDK-6788458
    1153                 // hg.openjdk.java.net/jdk7u/jdk7u/jdk/file/828c4fedd29f/src/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java#l656
     1153                // hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/dc4322602480/src/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java#l656
    11541154                img = read(path, false, true);
    11551155                if (Main.isDebugEnabled() && isTransparencyForced(img)) {
     
    18091809     * @return the {@code TransparentColor} defined in image reader metadata, or {@code null}
    18101810     * @throws IOException if an error occurs during reading
    1811      * @see <a href="http://docs.oracle.com/javase/7/docs/api/javax/imageio/metadata/doc-files/standard_metadata.html">javax_imageio_1.0 metadata</a>
     1811     * @see <a href="http://docs.oracle.com/javase/8/docs/api/javax/imageio/metadata/doc-files/standard_metadata.html">javax_imageio_1.0 metadata</a>
    18121812     * @since 7499
    18131813     */
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java

    r10339 r10580  
    7373            // We'll just ignore this for now. The user will still be able to close JOSM by closing all its windows.
    7474            Main.warn("Failed to register with OSX: " + ex);
    75         }
    76         // Invite users to install Java 8 if they are still with Java 7
    77         String java = System.getProperty("java.version");
    78         if (java != null && java.startsWith("1.7")) {
    79             askUpdateJava(java);
    8075        }
    8176    }
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java

    r10379 r10580  
    113113    @Override
    114114    public void startupHook() {
    115         if (isDebianOrUbuntu()) {
    116             // Invite users to install Java 8 if they are still with Java 7 and using a compatible distrib (Debian >= 8 or Ubuntu >= 15.10)
    117             String java = System.getProperty("java.version");
    118             String os = getOSDescription();
    119             if (java != null && java.startsWith("1.7") && os != null && (
    120                     os.startsWith("Linux Debian GNU/Linux 8") || os.matches("^Linux Ubuntu 1[567].*"))) {
    121                 String url;
    122                 // apturl does not exist on Debian (see #8465)
    123                 if (os.startsWith("Linux Debian")) {
    124                     url = "https://packages.debian.org/jessie-backports/openjdk-8-jre";
    125                 } else if (getPackageDetails("apturl") != null) {
    126                     url = "apt://openjdk-8-jre";
    127                 } else {
    128                     url = "http://packages.ubuntu.com/xenial/openjdk-8-jre";
    129                 }
    130                 askUpdateJava(java, url);
    131             }
    132         }
     115        // Do nothing
    133116    }
    134117
     
    272255    public String getJavaPackageDetails() {
    273256        String home = System.getProperty("java.home");
    274         if (home.contains("java-7-openjdk") || home.contains("java-1.7.0-openjdk")) {
    275             return getPackageDetails("openjdk-7-jre", "java-1_7_0-openjdk", "java-1.7.0-openjdk");
     257        if (home.contains("java-8-openjdk") || home.contains("java-1.8.0-openjdk")) {
     258            return getPackageDetails("openjdk-8-jre", "java-1_8_0-openjdk", "java-1.8.0-openjdk");
     259        } else if (home.contains("java-9-openjdk") || home.contains("java-1.9.0-openjdk")) {
     260            return getPackageDetails("openjdk-9-jre", "java-1_9_0-openjdk", "java-1.9.0-openjdk");
    276261        } else if (home.contains("icedtea")) {
    277262            return getPackageDetails("icedtea-bin");
     
    434419    }
    435420
    436     protected void askUpdateJava(String version) {
    437         if (!GraphicsEnvironment.isHeadless()) {
    438             askUpdateJava(version, "https://www.java.com/download");
    439         }
    440     }
    441 
     421    // Method unused, but kept for translation already done. To reuse during Java 9 migration
    442422    protected void askUpdateJava(final String version, final String url) {
    443423        GuiHelper.runInEDTAndWait(new Runnable() {
     
    449429                        new String[]{tr("OK"), tr("Update Java"), tr("Cancel")});
    450430                // Check if the dialog has not already been permanently hidden by user
    451                 if (!ed.toggleEnable("askUpdateJava8").toggleCheckState()) {
     431                if (!ed.toggleEnable("askUpdateJava9").toggleCheckState()) {
    452432                    ed.setButtonIcons(new String[]{"ok", "java", "cancel"}).setCancelButton(3);
    453433                    ed.setMinimumSize(new Dimension(480, 300));
     
    457437                    if ("Sun Microsystems Inc.".equals(System.getProperty("java.vendor")) && !isOpenJDK()) {
    458438                        content.append("<b>").append(tr("This version is no longer supported by {0} since {1} and is not recommended for use.",
    459                                 "Oracle", tr("April 2015"))).append("</b><br><br>");
     439                                "Oracle", tr("April 2015"))).append("</b><br><br>"); // TODO: change date once Java 8 EOL is announced
    460440                    }
    461441                    content.append("<b>")
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java

    r10378 r10580  
    6464    @Override
    6565    public void startupHook() {
    66         // Invite users to install Java 8 if they are still with Java 7
    67         String version = System.getProperty("java.version");
    68         if (version != null && version.startsWith("1.7")) {
    69             askUpdateJava(version);
    70         }
     66        // Do nothing
    7167    }
    7268
  • trunk/test/unit/org/openstreetmap/josm/TestUtils.java

    r10390 r10580  
    142142    /**
    143143     * Returns the Java version as an int value.
    144      * @return the Java version as an int value (7, 8, 9, etc.)
     144     * @return the Java version as an int value (8, 9, etc.)
    145145     */
    146146    public static int getJavaVersion() {
     
    150150        }
    151151        // Allow these formats:
    152         // 1.7.0_91
    153152        // 1.8.0_72-ea
    154153        // 9-ea
  • trunk/windows/launch4j.xml

    r9953 r10580  
    1414  <jre>
    1515    <path></path>
    16     <minVersion>1.7.0</minVersion>
     16    <minVersion>1.8.0</minVersion>
    1717    <maxVersion></maxVersion>
    1818    <jdkPreference>preferJre</jdkPreference>
Note: See TracChangeset for help on using the changeset viewer.