Changeset 14316 in josm for trunk/src


Ignore:
Timestamp:
2018-10-13T01:37:04+02:00 (14 months ago)
Author:
Don-vip
Message:

rework Travis config:

  • add Windows build (Oracle JDK 11 only as Java is not fully supported yet)
  • drop openjdk10 (not LTS)
  • use openjdk11 on Linux instead of oraclejdk11
  • add macOS xcode10 (ships with jdk10)
File:
1 edited

Legend:

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

    r14272 r14316  
    66
    77import java.awt.Desktop;
     8import java.awt.GraphicsEnvironment;
    89import java.awt.Image;
    910import java.awt.Window;
     
    7475                quitHandler, aboutHandler, openFilesHandler, preferencesHandler}, this);
    7576            Object appli = eawtApplication.getConstructor((Class[]) null).newInstance((Object[]) null);
    76             if (Utils.getJavaVersion() >= 9) {
    77                 setHandlers(Desktop.class, quitHandler, aboutHandler, openFilesHandler, preferencesHandler, proxy, Desktop.getDesktop());
    78             } else {
     77            if (Utils.getJavaVersion() < 9) {
    7978                setHandlers(eawtApplication, quitHandler, aboutHandler, openFilesHandler, preferencesHandler, proxy, appli);
    8079                // this method has been deprecated, but without replacement. To remove with Java 9 migration
    8180                eawtApplication.getDeclaredMethod("setEnabledPreferencesMenu", boolean.class).invoke(appli, Boolean.TRUE);
     81            } else if (!GraphicsEnvironment.isHeadless()) {
     82                setHandlers(Desktop.class, quitHandler, aboutHandler, openFilesHandler, preferencesHandler, proxy, Desktop.getDesktop());
    8283            }
    8384            // setup the dock icon. It is automatically set with application bundle and Web start but we need
Note: See TracChangeset for help on using the changeset viewer.