osascript in mac is unnecessary and exec will not allow the last line to execute anyway

This commit is contained in:
Anton Keks 2022-01-12 19:39:05 +02:00
parent 625779f3b7
commit ff5bf7f738
2 changed files with 2 additions and 3 deletions

View File

@ -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"'

View File

@ -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);
}
}