code: public static boolean supportsTray()
          {
          try
              {
              final Class trayClass = Class.forName("java.awt.SystemTray");
              final Boolean bool = 
                  (Boolean) trayClass.getDeclaredMethod("isSupported").invoke(null);
              return bool.booleanValue();
              }
          catch (final Exception e)
              {
              LOG.warn("Reflection error", e);
              return false;
              }
          }
docs: Uses reflection to determine whether or not this operating system and
  java version supports the system tray.
  
  @return <code>true</code> if it supports the tray, otherwise
  <code>false</code>.