depstar

Discussion around https://github.com/seancorfield/depstar
2020-11-25T19:00:55.178500Z

And I'm happy to say that I have an aot uberjar now. I tried and it keep working using java -cp MyProject.jar clojure.main -m project.core. Is it ok to run this way instead of java -jar MyProject.jar?

seancorfield 2020-11-25T19:03:17.179200Z

If you built the JAR with --main-class project.core then java -jar should work.

seancorfield 2020-11-25T19:03:31.179600Z

(and your project.core ns has (:gen-class))

2020-11-25T19:04:56.181500Z

Yeah, both work in my tests. I'm wondering if there is a problem using java -cp MyProject.jar clojure.main -m project.core with the aot uberjar.

seancorfield 2020-11-25T19:06:43.182200Z

The difference between the two invocations is that java -cp ... will run clojure.main/-main and that will parse the command-line args and then invoke project.core/-main (as a regular Clojure function), whereas java -jar will invoke project.core/-main directly (as a Java static method).

seancorfield 2020-11-25T19:06:55.182400Z

(otherwise, no difference)

2020-11-25T19:19:02.182600Z

This is great, thanks!