From 5209a67035578bfb1a9a09aebb0a638c96dc1895 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 14 Jul 2025 11:26:31 +0200 Subject: [PATCH] build: Avoid failure of the Java tests in Cygwin-based environments. * examples/test (prog): In Cygwin-based environments, convert the class path element to native Windows syntax. --- examples/test | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/examples/test b/examples/test index 471e1bf2..f5100649 100755 --- a/examples/test +++ b/examples/test @@ -54,6 +54,15 @@ if test -x "$abs_medir/$me"; then elif test -f "$abs_medir/$me.class"; then prog () { + # In Cygwin-based environments, the Java implementation still is a + # native Windows Java. Therefore we need to convert the elements + # of the class path from Cygwin syntax to native Windows syntax. + # The javaexec.sh script does not do this for us. + case `uname -s` in + CYGWIN*) + abs_medir=`cygpath -w "$abs_medir"` + ;; + esac "$SHELL" "$cwd/javaexec.sh" -cp "$abs_medir" "$me" "$@" } else