technomancy/leiningen — Issue #318: `lein run` doesn't work for Java main() methods?
Author: klauern
Created: 2011-11-12 04:00:02+00:00
State: open

I want to run a [VimClojure server][https://bitbucket.org/kotarak/vimclojure], and I'd like to follow some of the directions [in this blog][http://blog.darevay.com/2010/10/how-i-tamed-vimclojure/], specifically this line:

```cmd
$ java -cp "classpath including clojure jars and server-2.3.0.jar" vimclojure.nailgun.NGServer 127.0.0.1
```

and I was thinking that `lein run` would be able to do this for me, but it appears it's specific to Clojure files and defining a main in your `project.clj`.

I'm not sure whether a new command would work for this or not, but really, what I'd liek to be able to do is:

1. pass a `java -cp` with all of the classpath of `:dependencies` and `:dev-dependencies`
2. pass a classname to run
3. pass some arguments for that class

One way that would work in a Bash script would be to just pass a `lein classpath` along to `java -cp`, but that feature isn't available to me in Windows-world:

```
java -cp `lein classpath` vimclojure.nailgun.NGServer 127.0.0.1
```