Post Reply 
minimWatch not launching on latest java
30-03-2019, 10:31 (This post was last modified: 31-03-2019 06:39 by zarashi.)
Post: #1
minimWatch not launching on latest java
It seems like minimWatch cannot launch if it is on latest java.
I have looked into launcher script and modified it as below so that I can skip the version check, however it does not launch saying "JRELoadError" dialog.
Code:
--- MinimLaunchScript_before    2017-12-14 07:12:02.000000000 +0900
+++ MinimLaunchScript_after     2019-03-30 18:17:00.000000000 +0900
@@ -11,15 +11,11 @@
     exit
fi

-JAVAFILE="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java"
-if [ -x "${JAVAFILE}" ]; then
-    JAVAVERSION=$("${JAVAFILE}" -version 2>&1 | awk 'NR==1{print $3}')
-    JAVAVER="${JAVAVERSION:1:3}"
-else
-    JAVAVER=""
-fi
+JAVAFILE="/usr/bin/java"
+/usr/libexec/java_home -v 1.7+ 1>/dev/null 2>&1
+JAVA_COMPAT=$?

-if [ "${JAVAVER}" = "" -o "${JAVAVER}" = "1.6" -o "${JAVAVER}" = "1.5" -o "${JAVAVER}" = "1.4" ]; then
+if ! [[ $JAVA_COMPAT != 0 ]]; then
     MESSAGE="To run MinimWatch, you need to download and install Java 7 or later. Download Java now?"
     LINE1="set iconFile to (\"${DIRNAME}/../Resources/minimwatch.icns\") as POSIX file"
     LINE2="tell app \"SystemUIServer\" to display dialog \"${MESSAGE}\" with icon iconFile with title \"MinimWatch Launch Error\""

I have also tried symlinking the Internet-Plugin java_home directory as below, but it turned out to be the same result; getting "JRELoadError" dialog.
Code:
sudo mkdir -p "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/"
sudo ln -s $(/usr/libexec/java_home) "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"

I am using latest java installed through `brew cask install java`
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
minimWatch not launching on latest java - zarashi - 30-03-2019 10:31

Forum Jump:


User(s) browsing this thread: 1 Guest(s)