Skip to content
This repository has been archived by the owner on Mar 11, 2019. It is now read-only.

game example doesn't work with lein uberjar #3

Closed
greggaree opened this issue Feb 18, 2014 · 2 comments
Closed

game example doesn't work with lein uberjar #3

greggaree opened this issue Feb 18, 2014 · 2 comments

Comments

@greggaree
Copy link

I downloaded the zip file from play-clj-examples and extracted a game example. While I was able to run the platform game in lein repl or lein run, I couldn't get it to run after executing lein uberjar. Instead, I receive this error:

C:...platform game> java -jar target\super-koalio-0.0.1-SNAPSHOT.jar
Exception in thread "main" java.lang.NoClassDefFoundError: clojure/lang/IFn
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
        at java.lang.Class.getMethod0(Class.java:2774)
        at java.lang.Class.getMethod(Class.java:1663)
        at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: clojure.lang.IFn
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        ... 6 more

Greg

@oakes
Copy link
Owner

oakes commented Feb 18, 2014

There should be a second jar file in the target directory called "super-koalio-0.0.1-SNAPSHOT-standalone.jar". You'll need to run that one, because the non-standalone jar doesn't contain all the dependencies. Let me know if you still have problems.

@oakes oakes closed this as completed Feb 18, 2014
@greggaree
Copy link
Author

I was using the auto-complete feature to type out the rest of the jar path, Windows completed with the regular version of the jar. D'oh! I didn't realize lein uberjar creates two jars.

Many Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants