Fork me on GitHub
#tools-deps
<
2022-09-16
>
Alex Miller (Clojure team)22:09:53

Prerelease version of the Clojure CLI 1.11.1.1161 is now available: • Adds new CLJ_JVM_OPTS env var that can be used to set jvm opts on the internal processes that build classpaths • Adds support for including the not-standard but common JAVA_OPTS for setting jvm opts on user programs, which may be useful in cases where people have previously asked for "global" jvm opts • This support has been implemented for Linux and Mac, but not yet for Windows (but I will do that before I do an official release)

🙌 6
Alex Miller (Clojure team)22:09:41

(Also, I learned that since Java 9 there is a new standard JDK_JAVA_OPTIONS env var - you can set that to send jvm options to all the Java things)

practicalli-johnny19:09:19

This is really useful, thanks. I’m using JDK_JAVA_OPTIONS to pass options to the java command to set heap size constraints https://docs.oracle.com/en/java/javase/14/docs/specs/man/java.html#using-the-jdk_java_options-launcher-environment-variable I’m using it in the Dockerfile for my current project and its working well

# JDK_JAVA_OPTIONS environment variable for setting JVM options
ENV JDK_JAVA_OPTIONS "-XshowSettings:system -XX:+UseContainerSupport -XX:MaxRAMPercentage=90"

# Start service (over-rides default entrypoint command of image)
CMD ["java", "-jar", "/service.jar"]

practicalli-johnny19:09:19

This is really useful, thanks. I’m using JDK_JAVA_OPTIONS to pass options to the java command to set heap size constraints https://docs.oracle.com/en/java/javase/14/docs/specs/man/java.html#using-the-jdk_java_options-launcher-environment-variable I’m using it in the Dockerfile for my current project and its working well

# JDK_JAVA_OPTIONS environment variable for setting JVM options
ENV JDK_JAVA_OPTIONS "-XshowSettings:system -XX:+UseContainerSupport -XX:MaxRAMPercentage=90"

# Start service (over-rides default entrypoint command of image)
CMD ["java", "-jar", "/service.jar"]