When running a successfully built image for a Clojure application on Toolforge, the application fails to start and the log contains a single entry: bash: line 1: java: command not found
Changing the Procfile for the application to contain an absolute path to the java binary (/app/.jdk/bin/java) fixes the problem.
To replicate
Build and run a Clojure web application, for example version 1.0.4 of the Technical Documentation Dashboard (GitLab repository) on Toolforge.
What happens?:
The application fails to start with the following error: bash: line 1: java: command not found
What should have happened instead?:
The application should start and be available under its URL.
Workaround:
Change the content of the Procfile
From:
web: java -cp target/dashboard-standalone.jar techdoc.dashboard.core
To:
web: /app/.jdk/bin/java -cp target/dashboard-standalone.jar techdoc.dashboard.core