Java's getDesktop() crashes if GTK3 is already loaded by SWT (apparently, it tries to load GTK2) - use SWT own API instead that works in both cases

This commit is contained in:
Anton Keks 2016-12-08 00:34:13 +02:00
parent 73100ce64c
commit e2da192845
2 changed files with 2 additions and 5 deletions

View File

@ -1,6 +1,5 @@
HiDPI:
* New flat and retina-compatible icons :-)
* GTK3 crashes URL opening with Desktop.getDesktop()
* GTK3 startup is slow
* GTK3 progress bar - can it be centered?
* Fewer problems when starting with SWT_GTK3=0

View File

@ -6,9 +6,7 @@
package net.azib.ipscan.gui.actions;
import net.azib.ipscan.core.UserErrorException;
import java.awt.*;
import java.net.URI;
import org.eclipse.swt.program.Program;
/**
* The cross-platform browser launcher
@ -23,7 +21,7 @@ public class BrowserLauncher {
*/
public static void openURL(String url) {
try {
Desktop.getDesktop().browse(new URI(url));
Program.launch(url);
}
catch (Exception e) {
throw new UserErrorException("openURL.failed", url);