Your manifest assumes your main class lives in the default Java
package, but doesn't it really live in the progs.comex package?  Also,
don't you need to use the "m" switch when you specify a manifest to
the jar command?

Bill

On Jan 27, 10:01 pm, smarf <haskell...@gmail.com> wrote:
> (ns progs.comex.compileexamples
>     (:gen-class))
>
> (defn -main
>   []
>   (println (str "Hello " "Sverker" "!")))
>
> (binding [*compile-path* "C:\\clojure\\classes"]
>   (compile 'progs.comex.compileexample))
>
> I compiled C:/clojure/progs/comex/compileexample.clj.
> I can run the program with:
>
> C:\clojure\classes>java -cp C:/clojure/clojure.jar;
> progs.comex.compileexample
> Hello Sverker!
>
> Manifest.txt says:
> Main-Class: compileexample.class
>
> and is finished with a newline.
>
> so how do I make it a jar?
>
> C:\clojure\classes\progs\comex>dir
>  Volume in drive C is Vista
>  Volume Serial Number is DC46-FE33
>
>  Directory of C:\clojure\classes\progs\comex
>
> 2009-01-28  03:33    <DIR>          .
> 2009-01-28  03:33    <DIR>          ..
> 2009-01-27  23:47             1 101 compileexample$fn__554.class
> 2009-01-27  23:47             1 131 compileexample$_main__551.class
> 2009-01-27  23:47             1 812 compileexample.class
> 2009-01-27  23:47             2 431 compileexample__init.class
> 2009-01-28  03:31                34 manifest.txt
>                5 File(s)          6 509 bytes
>                2 Dir(s)   5 783 875 584 bytes free
>
> C:\clojure\classes\progs\comex>jar cf Hmm.jar C:/clojure/clojure.jar
> manifest.tx
> t compileexample.class
>
> C:\clojure\classes\progs\comex>Hmm.jar
>
> C:\clojure\classes\progs\comex>
>
> i get a popup :
> Java Virtual Machine Launcher
> Failed to load Main-class manifest attribute from
> C:\clojure
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to