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

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
tofi86 committed Apr 23, 2017
2 parents c42686b + d8ec559 commit b782b01
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
ChangeLog
---------

### v2.0.2 (2017-04-23)
* Bugfix: do NOT expand/evaluate the default Oracle Classpath (`App.app/Contents/Java/*`) (PR #42, Thanks to @mguessan for his contribution)

### v2.0.1 (2016-11-27)
* Bugfix for regression in argument passthru introduced in 2.0.0 (fixes #39)

Expand Down
15 changes: 10 additions & 5 deletions src/universalJavaApplicationStub
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# #
# @author Tobias Fischer #
# @url https://github.com/tofi86/universalJavaApplicationStub #
# @date 2016-11-27 #
# @version 2.0.1 #
# @date 2017-11-27 #
# @version 2.0.2 #
# #
# #
##################################################################################
Expand Down Expand Up @@ -218,14 +218,19 @@ else
JVMClassPath_RAW=`/usr/libexec/PlistBuddy -c "print JVMClassPath" "${InfoPlistFile}" 2> /dev/null`
if [[ $JVMClassPath_RAW == *Array* ]] ; then
JVMClassPath=.`/usr/libexec/PlistBuddy -c "print JVMClassPath" "${InfoPlistFile}" 2> /dev/null | grep " " | sed 's/^ */:/g' | tr -d '\n' | xargs`
# expand variables $APP_PACKAGE, $JAVAROOT, $USER_HOME
JVMClassPath=`eval "echo ${JVMClassPath}"`

elif [[ ! -z ${JVMClassPath_RAW} ]] ; then
JVMClassPath=${JVMClassPath_RAW}
# expand variables $APP_PACKAGE, $JAVAROOT, $USER_HOME
JVMClassPath=`eval "echo ${JVMClassPath}"`

else
#default: fallback to OracleJavaFolder
JVMClassPath="${JavaFolder}/*"
# Do NOT expand the default App.app/Contents/Java/* classpath (#42)
fi
# expand variables $APP_PACKAGE, $JAVAROOT, $USER_HOME
JVMClassPath=`eval "echo ${JVMClassPath}"`

# read the JVM Default Options
JVMDefaultOptions=`/usr/libexec/PlistBuddy -c "print :JVMDefaultOptions" "${InfoPlistFile}" 2> /dev/null | grep -o " \-.*" | tr -d '\n' | xargs`
Expand Down Expand Up @@ -474,7 +479,7 @@ elif [ -f "$JAVACMD" ] && [ -x "$JAVACMD" ] ; then

# enable drag&drop to the dock icon
export CFProcessPath="$0"

# remove Apples ProcessSerialNumber from passthru arguments (#39)
if [[ $@ == -psn* ]] ; then
ArgsPassthru=""
Expand Down

0 comments on commit b782b01

Please sign in to comment.