Ignore:
Timestamp:
2016-08-11T21:54:24+02:00 (8 years ago)
Author:
Don-vip
Message:

see #11390 - remove non-working java version check as it would need to compile some classes with JDK7

File:
1 edited

Legend:

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

    r10759 r10786  
    66import java.awt.BorderLayout;
    77import java.awt.Component;
    8 import java.awt.GridBagConstraints;
    9 import java.awt.GridBagLayout;
    108import java.awt.Window;
    119import java.awt.event.KeyEvent;
     
    4745import javax.swing.JOptionPane;
    4846import javax.swing.JPanel;
    49 import javax.swing.JTextArea;
    5047import javax.swing.KeyStroke;
    5148import javax.swing.LookAndFeel;
     
    8380import org.openstreetmap.josm.gui.MapFrame;
    8481import org.openstreetmap.josm.gui.MapFrameListener;
    85 import org.openstreetmap.josm.gui.help.HelpUtil;
    8682import org.openstreetmap.josm.gui.io.SaveLayersDialog;
    8783import org.openstreetmap.josm.gui.layer.AbstractModifiableLayer;
     
    9995import org.openstreetmap.josm.gui.util.GuiHelper;
    10096import org.openstreetmap.josm.gui.util.RedirectInputMap;
    101 import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
    10297import org.openstreetmap.josm.io.FileWatcher;
    10398import org.openstreetmap.josm.io.OnlineResource;
     
    13041299    }
    13051300
    1306     /**
    1307      * Checks that JOSM is at least running with Java 8.
    1308      * @since 7001
    1309      */
    1310     public static void checkJavaVersion() {
    1311         String version = System.getProperty("java.version");
    1312         if (version != null) {
    1313             if (version.matches("^(1\\.)?[89].*"))
    1314                 return;
    1315             if (version.matches("^(1\\.)?[567].*")) {
    1316                 JMultilineLabel ho = new JMultilineLabel("<html>"+
    1317                         tr("<h2>JOSM requires Java version {0}.</h2>"+
    1318                                 "Detected Java version: {1}.<br>"+
    1319                                 "You can <ul><li>update your Java (JRE) or</li>"+
    1320                                 "<li>use an earlier (Java {2} compatible) version of JOSM.</li></ul>"+
    1321                                 "More Info:", "8", version, "7")+"</html>");
    1322                 JTextArea link = new JTextArea(HelpUtil.getWikiBaseHelpUrl()+"/Help/SystemRequirements");
    1323                 link.setEditable(false);
    1324                 link.setBackground(panel.getBackground());
    1325                 JPanel panel = new JPanel(new GridBagLayout());
    1326                 GridBagConstraints gbc = new GridBagConstraints();
    1327                 gbc.gridwidth = GridBagConstraints.REMAINDER;
    1328                 gbc.anchor = GridBagConstraints.WEST;
    1329                 gbc.weightx = 1.0;
    1330                 panel.add(ho, gbc);
    1331                 panel.add(link, gbc);
    1332                 final String exitStr = tr("Exit JOSM");
    1333                 final String continueStr = tr("Continue, try anyway");
    1334                 int ret = JOptionPane.showOptionDialog(null, panel, tr("Error"), JOptionPane.YES_NO_OPTION,
    1335                         JOptionPane.ERROR_MESSAGE, null, new String[] {exitStr, continueStr}, exitStr);
    1336                 if (ret == 0) {
    1337                     System.exit(0);
    1338                 }
    1339                 return;
    1340             }
    1341         }
    1342         error("Could not recognize Java Version: "+version);
    1343     }
    1344 
    13451301    /* ----------------------------------------------------------------------------------------- */
    13461302    /* projection handling  - Main is a registry for a single, global projection instance        */
Note: See TracChangeset for help on using the changeset viewer.