Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 289da57

Browse files
committed
read StartOnMainThread // fixes #4
Thanks to @wrstlbrnft for this contribution
1 parent 42a9bfa commit 289da57

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/universalJavaApplicationStub

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,13 @@ if [ $exitcode -eq 0 ]; then
153153
# read the JVM Options
154154
JVMOptions=`/usr/libexec/PlistBuddy -c "print :Java:Properties" "${InfoPlistFile}" 2> /dev/null | grep " =" | sed 's/^ */-D/g' | tr '\n' ' ' | sed 's/ */ /g' | sed 's/ = /=/g' | xargs`
155155

156+
# read StartOnMainThread
157+
JVMStartOnMainThread=`/usr/libexec/PlistBuddy -c "print :Java:StartOnMainThread" "${InfoPlistFile}" 2> /dev/null`
158+
if [ "${JVMStartOnMainThread}" == "true" ]; then
159+
echo ${JVMStartOnMainThread} > ~/Desktop/test.txt
160+
JVMOptions+=" -XstartOnFirstThread"
161+
fi
162+
156163
# read the ClassPath in either Array or String style
157164
JVMClassPath_RAW=`/usr/libexec/PlistBuddy -c "print :Java:ClassPath" "${InfoPlistFile}" 2> /dev/null`
158165
if [[ $JVMClassPath_RAW == *Array* ]] ; then

0 commit comments

Comments
 (0)