From ff5bf7f738c27ca855b07969a374c3d90ab2300a Mon Sep 17 00:00:00 2001 From: Anton Keks Date: Wed, 12 Jan 2022 19:39:05 +0200 Subject: [PATCH] osascript in mac is unnecessary and exec will not allow the last line to execute anyway --- ext/mac-bundle/Angry IP Scanner.app/Contents/MacOS/ipscan | 1 - src/net/azib/ipscan/Main.java | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ext/mac-bundle/Angry IP Scanner.app/Contents/MacOS/ipscan b/ext/mac-bundle/Angry IP Scanner.app/Contents/MacOS/ipscan index 89054767..c5f63fb1 100755 --- a/ext/mac-bundle/Angry IP Scanner.app/Contents/MacOS/ipscan +++ b/ext/mac-bundle/Angry IP Scanner.app/Contents/MacOS/ipscan @@ -2,4 +2,3 @@ BASEDIR=`dirname "$0"` # MacOS will prompt to download Oracle JDK if it's not installed exec java --add-opens java.base/java.net=ALL-UNNAMED -XstartOnFirstThread -jar "$BASEDIR"/ipscan*.jar -[ $? != 0 ] && osascript -e 'display notification "You need Java/OpenJDK 11 installed" with title "Angry IP Scanner"' diff --git a/src/net/azib/ipscan/Main.java b/src/net/azib/ipscan/Main.java index 141746af..b287cf5c 100644 --- a/src/net/azib/ipscan/Main.java +++ b/src/net/azib/ipscan/Main.java @@ -70,7 +70,7 @@ public class Main { catch (NoClassDefFoundError e) { e.printStackTrace(); new GoogleAnalytics().report(e); - showFallbackError("SWT GUI toolkit not available: " + e.toString() + "\n\nIf you are using platform-neutral build, make sure you provide SWT built for your platform manually (e.g. install libswt packages), or please use a platform specific binary."); + showFallbackError("SWT GUI toolkit not available: " + e + "\n\nIf you are using platform-neutral build, make sure you provide SWT built for your platform manually (e.g. install libswt packages), or please use a platform specific binary."); } catch (Throwable e) { handleFatalError(gui, e); @@ -95,7 +95,7 @@ public class Main { .invoke(null, null, message); } catch (Exception e) { - System.err.println(e.toString()); + System.err.println(e); System.err.println(message); } }