Bug#1104784: Fails to work with PATH=/bin:$PATH

Simon Josefsson simon at josefsson.org
Tue May 6 13:04:54 BST 2025


Package: gradle
Version: 4.4.1-22

Hi!  Gradle doesn't like being invoked with /bin before /usr/bin in
PATH, and fails like this:

root at af57908f5326:/# PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
root at af57908f5326:/# gradle
/bin/gradle: 23: cd: can't cd to /bin/../share/gradle/bin/..
openjdk version "21.0.7" 2025-04-15
OpenJDK Runtime Environment (build 21.0.7+6-Debian-1)
OpenJDK 64-Bit Server VM (build 21.0.7+6-Debian-1, mixed mode, sharing)
Error: Could not find or load main class org.gradle.launcher.GradleMain
Caused by: java.lang.ClassNotFoundException: org.gradle.launcher.GradleMain
root at af57908f5326:/# echo $?
1
root at af57908f5326:/# 

It would be nice if the 'gradle' wrapper script handle this situation
properly, and that it finds /usr/share/gradle properly in this
situation.

This is causing FTBFS of bookworm packages that use gradle during the
package build like 'testng7', 'opentest4j', 'opentest4j-reporting',
'picocli', 'libspring-java', 'jayway-jsonpath', 'mongo-java-driver', and
maybe some others.

/Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1251 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-maintainers/attachments/20250506/b0862e8e/attachment.sig>


More information about the pkg-java-maintainers mailing list