Reputation: 5
I am trying to run java setup and then lein setup, where java setup run successfully.
We are getting problem to run java required next step.
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Use oxr463/setup-leiningen // this step needs java
uses: oxr463/[email protected]
with:
exec: |
lein uberjar && \
cp "$(find . -name '*.jar')" .
Error at after the workflow run :
/usr/local/bin/lein: line 224: type: java: not found
Leiningen couldn't find 'java' executable, which is required.
Please either set JAVA_CMD or put java (>=1.6) in your $PATH (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin).
/usr/local/bin/lein: line 224: type: java: not found
Leiningen couldn't find 'java' executable, which is required.
Please either set JAVA_CMD or put java (>=1.6) in your $PATH (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin).
Am I missing any step? Please do suggest the solution.
Upvotes: 0
Views: 260
Reputation: 462
Try setting the JAVA_CMD environment variable to the path of the Java executable. This might help Leiningen locate the Java installation.
env:
JAVA_CMD: $(which java) # Set JAVA_CMD to the path of the Java executable
Upvotes: 0