Fork me on GitHub

Is it expected behaviour that a top level :jvm-opts in deps.edn is ignored?

Alex Miller (Clojure team)21:12:07

yeah, that's not a feature

Alex Miller (Clojure team)21:12:33

there is an ask question at about this if you want to vote on it. (but I think it's unlikely that that will be the final answer)


OK, thanks Alex.


Is it possible to introspect the command line arguments from a running JVM?

Alex Miller (Clojure team)22:12:18

generically, not that I'm aware of


It's probably better to use an external tool for that - either checking the cmd line or using something like jcmd, JMC, etc.


Since JDK 9, you can also use ProcessHandle if this is what you are after:

(-> (java.lang.ProcessHandle/current) .info .commandLine .get)
EDIT: or this to get only the args
(-> (java.lang.ProcessHandle/current) .info .arguments .get)

😎 1

thanks @U06BE1L6T - that’s useful to assert that the jvm options are getting set


There is also a clj-kondo issue about it: Feel free to upvote using a thumbs up.


Just wanted to drop a note that the new :classpath-roots and :classpath apis are fantastic, I've been able to simplify a bunch of code AND better align with how tdeps behaves 🙂

👍 1