fix-spawner-classpath.diff
src/native/postbuild.sh 2023-11-29 08:50:13 +0000 | ||
---|---|---|
87 | 87 |
# |
88 | 88 | |
89 | 89 |
if [ $# -eq 0 ]; then |
90 |
echo "Usage: $0 <spawn-install-dir> <spawn-tool> [ <srv-certs.store location> ] [ <path-to p2j.jar ]" |
|
90 |
echo "Usage: $0 <spawn-install-dir> <spawn-tool> [ <srv-certs.store location> ] [ <path-to p2j.jar> ]"
|
|
91 | 91 |
exit 1 |
92 | 92 |
fi |
93 | 93 | |
94 | 94 |
P2J_JAR="../lib/p2j.jar" |
95 |
SLF4J_IMPL="../lib/fwd-slf4j.jar" |
|
95 | 96 |
if [ $# -eq 2 ]; then |
96 | 97 |
spawn_dir=$1 |
97 | 98 |
spawn_prog=$2 |
... | ... | |
107 | 108 |
cert_file=$3 |
108 | 109 |
P2J_JAR=$4 |
109 | 110 |
echo "Installing the spawn tool $spawn_prog into ${spawn_dir}/spawn using $cert_file as srv-certs.store file with p2j=${P2J_JAR}..." |
111 |
elif [ $# -eq 5 ]; then |
|
112 |
spawn_dir=$1 |
|
113 |
spawn_prog=$2 |
|
114 |
cert_file=$3 |
|
115 |
P2J_JAR=$4 |
|
116 |
SLF4J_IMPL=$5 |
|
117 |
echo "Installing the spawn tool $spawn_prog into ${spawn_dir}/spawn using $cert_file as srv-certs.store |
|
118 |
file with p2j=${P2J_JAR} and slf4j=${SLF4J_IMPL}..." |
|
110 | 119 |
fi |
111 | 120 | |
112 | 121 |
if [ ! -d "$spawn_dir" ]; then |
... | ... | |
137 | 146 | |
138 | 147 |
cp -f $spawn_prog ${spawn_dir}/spawn |
139 | 148 |
cp -f $P2J_JAR ${spawn_dir}/p2j.jar |
149 |
cp -f $SLF4J_IMPL ${spawn_dir}/slf4j-impl.jar |
|
140 | 150 | |
141 | 151 |
chown root:root ${spawn_dir}/spawn ${spawn_dir}/p2j.jar |
152 |
chown root:root ${spawn_dir}/spawn ${spawn_dir}/slf4j-impl.jar |
|
142 | 153 |
chmod 4755 ${spawn_dir}/spawn |
143 | 154 |
chmod 0550 ${spawn_dir}/p2j.jar |
155 |
chmod 0550 ${spawn_dir}/slf4j-impl.jar |
|
144 | 156 | |
145 | 157 |
if [ -f "${spawn_dir}/srv-certs.store" ]; then |
146 | 158 |
chown root:root ${spawn_dir}/srv-certs.store |
src/native/spawn.c 2023-11-29 08:50:13 +0000 | ||
---|---|---|
984 | 984 |
int nopts; |
985 | 985 |
|
986 | 986 |
JavaVMOption options[8]; |
987 |
options[0].optionString = "-Djava.class.path=./p2j.jar:."; |
|
987 |
options[0].optionString = "-Djava.class.path=./p2j.jar:./slf4j-impl.jar:.";
|
|
988 | 988 |
options[1].optionString = "-Djava.lib.path=."; |
989 | 989 |
options[2].optionString = "-Xmx512m"; |
990 | 990 |
options[3].optionString = "-Djava.awt.headless=true"; |
src/native/winspawn.c 2023-11-29 08:50:13 +0000 | ||
---|---|---|
786 | 786 |
int nopts; |
787 | 787 |
|
788 | 788 |
JavaVMOption options[9]; |
789 |
options[0].optionString = "-Djava.class.path=./p2j.jar;."; |
|
789 |
options[0].optionString = "-Djava.class.path=./p2j.jar;./slf4j-impl.jar;.";
|
|
790 | 790 |
options[1].optionString = "-Djava.lib.path=."; |
791 | 791 |
options[2].optionString = "-Xmx512m"; |
792 | 792 |
options[3].optionString = "-Djava.awt.headless=true"; |