Allow overriding java executable used by clojure script

Description

There is currently no way of overriding the Java executable used by clj/clojure on a per-invocation basis.

The clojure script uses the command type -p java to locate the java executable. Overriding is therefore possible by placing a symlink early on the shell's search PATH, but this isn't very convenient.

It would be useful to allow overriding using an environment variable, thus enabling invocations like JAVA_CMD=/path/to/java clj ....

Environment

clj 1.10.0.442

Activity

Show:
Alex Miller
February 5, 2021, 3:51 PM

Patch applied for next release

Gregor Middell
June 16, 2020, 2:24 PM

Hi Alex, patch attached to this ticket.

Alex Miller
June 16, 2020, 2:14 PM

Hi Gregor, we don't use PRs in this project. Please attach a patch to this ticket (instructions at https://clojure.org/dev/developing_patches).

Gregor Middell
June 16, 2020, 1:58 PM

Please see the corresponding GitHub PR for a potential fix.

Thanks!

Fixed

Assignee

Alex Miller

Reporter

David Bürgin