From ed574c091eb4f7f72dd70d28b056a07a1d73b19f Mon Sep 17 00:00:00 2001 From: mguessan Date: Mon, 27 Aug 2012 20:50:14 +0000 Subject: [PATCH] Revert drop SWT on Java 7 git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2003 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/ui/tray/DavGatewayTray.java | 22 +++++++++----------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/java/davmail/ui/tray/DavGatewayTray.java b/src/java/davmail/ui/tray/DavGatewayTray.java index c138456e..cff867b7 100644 --- a/src/java/davmail/ui/tray/DavGatewayTray.java +++ b/src/java/davmail/ui/tray/DavGatewayTray.java @@ -225,18 +225,16 @@ public final class DavGatewayTray { */ public static void init() { if (!Settings.getBooleanProperty("davmail.server")) { - // first try to load SWT before with Java, except on 1.7 - if (System.getProperty("java.version").compareTo("1.7") < 0) { - ClassLoader classloader = DavGatewayTray.class.getClassLoader(); - try { - // trigger ClassNotFoundException - classloader.loadClass("org.eclipse.swt.SWT"); - // SWT available, create tray - davGatewayTray = new SwtGatewayTray(); - davGatewayTray.init(); - } catch (ClassNotFoundException e) { - DavGatewayTray.info(new BundleMessage("LOG_SWT_NOT_AVAILABLE")); - } + // first try to load SWT before with Java + ClassLoader classloader = DavGatewayTray.class.getClassLoader(); + try { + // trigger ClassNotFoundException + classloader.loadClass("org.eclipse.swt.SWT"); + // SWT available, create tray + davGatewayTray = new SwtGatewayTray(); + davGatewayTray.init(); + } catch (ClassNotFoundException e) { + DavGatewayTray.info(new BundleMessage("LOG_SWT_NOT_AVAILABLE")); } // try java6 tray support if (davGatewayTray == null) {