Raynes / lein-bin

Standalone console executables for your project.
155 stars 19 forks source link

Cannot access system executable name when running standalone #19

Open retrogradeorbit opened 9 years ago

retrogradeorbit commented 9 years ago

When running the stand alone executable on a Unix system, there seems to be no way to access the executable's name.

(defn -main [& args]
  (println (System/getenv "_")))

$ lein run arg1 arg2 /usr/bin/java

$ target/bin arg1 arg2 nil

What I really want here is "target/bin", but I'm not sure if that is right. Maybe "/usr/bin/java" is more correct. Maybe the "target/bin" can be passed in to java somehow? Your thoughts?

Raynes commented 9 years ago

I do not know what this means.

retrogradeorbit commented 9 years ago

sorry. I clicked the button early. You are too fast!

Raynes commented 9 years ago

Hehe, no worries.