tools-build

Mark Wardle 2023-06-02T12:32:54.133129Z

EDITED: See thread... new question : should the tools.build example in the documentation use --release and not -source/-target ? Can I safely ignore warnings regarding "`system modules path not set in conjunction with -source 11"` or "bootstrap class path not set in conjunction with -source 8" when using tools.build javac with either _:javac-opts_ ["-source" "11" "-target" "11"] or _:javac-opts_ ["-source" "8" "-target" "8"] ? Should I manually switch to the correct version of java as part of my build, and then use that? I'm using openjdk 17 but want to build a library made up of Java and Clojure code that targets 11 and above.

Mark Wardle 2023-06-02T12:34:06.528679Z

I realise that this is more of a Java question than a Clojure/tools.build question, but I used to compile my Java sources in a separate project using maven, and don't recall having this warning.

Mark Wardle 2023-06-02T12:41:53.577699Z

Typical, I post to slack and then work out the answer.

Mark Wardle 2023-06-02T12:43:16.609829Z

I appear to have fixed the issue with using --release instead of -source and -target. This apparently is better for cross-compilation. Should the tools.build docs use --release and not -source and -target as per https://stackoverflow.com/a/43103038 ?

Alex Miller (Clojure team) 2023-06-02T13:08:47.732659Z

yes, should probably make that switch

👍 1
Alex Miller (Clojure team) 2023-06-02T13:11:16.649559Z

I think the small issue is that java 8's javac is still -source and -target

Alex Miller (Clojure team) 2023-06-02T13:11:35.191029Z

but probably time to assume newer

Mark Wardle 2023-06-02T13:24:21.773479Z

Thank you