Skip to content

Commit 0567974

Browse files
mikucboehme
authored andcommitted
Fix a weird MacOS classpath issue in flux.sh
The line: "$FLUX_JAVA_BIN" "${java_opts_array[@]}" -jar "$jar_file" "$@") resulted in a "Could not find or load main class" error. But when the verbatim command is executed in an interactive shell, it all works fine. Debugging with `-verbose:class` showed that the call from the script and the interactive call resulted in a different set classes loaded. Especially the culturegraph.* classes were missed. I cannot pin down the source of this bug. But changing the failing line to: command=$(echo "$FLUX_JAVA_BIN" "${java_opts_array[@]}" -jar "$jar_file" "$@") $command fixes the problem.
1 parent e99b463 commit 0567974

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/scripts/flux.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,5 @@ while read line ; do
111111
done < <( echo "$java_opts" | grep -Eo "$option_pattern" )
112112

113113
# Start flux:
114-
"$FLUX_JAVA_BIN" "${java_opts_array[@]}" -jar "$jar_file" "$@"
114+
command=$(echo "$FLUX_JAVA_BIN" "${java_opts_array[@]}" -jar "$jar_file" "$@")
115+
$command

0 commit comments

Comments
 (0)