@@ -97,16 +97,16 @@ if [ -d "${AppleJavaFolder}" ]; then
9797 JVMClasspath=" ${AppleJavaFolder} *"
9898
9999 # read the MainClass name
100- JVMMainClass=` /usr/libexec/PlistBuddy -c " print :Java:MainClass" ${InfoPlistFile} `
100+ JVMMainClass=` /usr/libexec/PlistBuddy -c " print :Java:MainClass" ${InfoPlistFile} 2> /dev/null `
101101
102102 # read the JVM Options
103- JVMOptions=` /usr/libexec/PlistBuddy -c " print :Java:Properties" ${InfoPlistFile} | grep " =" | sed ' s/^ */-D/g' | tr ' \n' ' ' | sed ' s/ */ /g' | sed ' s/ = /=/g' | xargs`
103+ 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`
104104
105105 # read the JVM Default Options
106- JVMDefaultOptions=` /usr/libexec/PlistBuddy -c " print :Java:VMOptions" ${InfoPlistFile} | xargs`
106+ JVMDefaultOptions=` /usr/libexec/PlistBuddy -c " print :Java:VMOptions" ${InfoPlistFile} 2> /dev/null | xargs`
107107
108108 # read the JVM Arguments
109- JVMArguments=` /usr/libexec/PlistBuddy -c " print :Java:Arguments" ${InfoPlistFile} | xargs`
109+ JVMArguments=` /usr/libexec/PlistBuddy -c " print :Java:Arguments" ${InfoPlistFile} 2> /dev/null | xargs`
110110
111111
112112# read Info.plist in Oracle style
@@ -116,16 +116,16 @@ elif [ -d "${OracleJavaFolder}" ]; then
116116 JVMClasspath=" ${OracleJavaFolder} *"
117117
118118 # read the MainClass name
119- JVMMainClass=` /usr/libexec/PlistBuddy -c " print :JVMMainClassName" ${InfoPlistFile} `
119+ JVMMainClass=` /usr/libexec/PlistBuddy -c " print :JVMMainClassName" ${InfoPlistFile} 2> /dev/null `
120120
121121 # read the JVM Options
122- JVMOptions=` /usr/libexec/PlistBuddy -c " print :JVMOptions" ${InfoPlistFile} | grep " -" | tr ' \n' ' ' | sed ' s/ */ /g' | xargs`
122+ JVMOptions=` /usr/libexec/PlistBuddy -c " print :JVMOptions" ${InfoPlistFile} 2> /dev/null | grep " -" | tr ' \n' ' ' | sed ' s/ */ /g' | xargs`
123123
124124 # read the JVM Default Options
125- JVMDefaultOptions=` /usr/libexec/PlistBuddy -c " print :JVMDefaultOptions" ${InfoPlistFile} | grep -o " \-.*" | tr ' \n' ' ' | xargs`
125+ JVMDefaultOptions=` /usr/libexec/PlistBuddy -c " print :JVMDefaultOptions" ${InfoPlistFile} 2> /dev/null | grep -o " \-.*" | tr ' \n' ' ' | xargs`
126126
127127 # read the JVM Arguments
128- JVMArguments=` /usr/libexec/PlistBuddy -c " print :JVMArguments" ${InfoPlistFile} | tr ' \n' ' ' | sed -E ' s/Array \{ *(.*) *\}/\1/g' | sed ' s/ */ /g' | xargs`
128+ JVMArguments=` /usr/libexec/PlistBuddy -c " print :JVMArguments" ${InfoPlistFile} 2> /dev/null | tr ' \n' ' ' | sed -E ' s/Array \{ *(.*) *\}/\1/g' | sed ' s/ */ /g' | xargs`
129129
130130fi
131131
0 commit comments