Fork me on GitHub
#tools-build
<
2023-06-02
>
Mark Wardle12:06:54

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 Wardle12:06:06

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 Wardle12:06:53

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

Mark Wardle12:06:16

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)13:06:47

yes, should probably make that switch

👍 2
Alex Miller (Clojure team)13:06:16

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

Alex Miller (Clojure team)13:06:35

but probably time to assume newer