Closed taoeffect closed 12 years ago
My development environment is OS X, so I'm pretty sure it's not that. Did you run "lein native-deps"?
Yup. That's why the -Djava.library.path=./native/macosx/x86/ is there.
Did you try compiling that project (without anything in your ~/Library/Java/Extensions folder)? Are you using Leiningen 1.2.0-RC2?
I'd be happy to try any suggestions out.
I am using Leiningen 1.2.0-RC2 with a clean Extensions folder. The error you're seeing seems to imply that you don't have lwjgl.jar on your classpath. My expectation is that if you're using 1.2.0-RC2 and run "lein repl", it should work without issue.
'lein repl' does nothing (it sits there, not outputting anything).
Also, how is this a classpath issue when that should be solved by 'lein uberjar' with the standalone jar?
Crap. Closed the issue by accident.
Sorry, I misread your original report. I expect uberjar only takes :dependencies into account, not :native-dependencies. Why use an uberjar in the first place?
Running the normal jar doesn't work either. How are you running it?
I tried with the uberjar and the non-uberjar (lame-jar, if you will):
java -Djava.library.path=./native/macosx/x86/ -cp jME-1.0.0-SNAPSHOT.jar:"lib/*" jME.core
Same exception. It's obviously not loaded the lwjgl.jar, but the lwjgl.jar is inside the lwjgl-2.4.2.jar (along with other jar files and native libraries). They're not being loaded.
I use uberjars because they're easy to run from the terminal. Again, lein repl doesn't work.
Perhaps this will help, I've zipped up the directory, you can get it here:
I run things from the repl, or the slime-repl in emacs. The fact that the repl isn't running is pretty strange. Is it just not running for this project, or for all of them?
I always give complete paths in my classpath. "lib/*" may not be sufficient, I'm not sure. Try following the template given in the "Getting Started" wiki entry for Penumbra.
Okay, I could get to a repl using "lein repl" with the contents of the zip file at http://dl.dropbox.com/u/174179/jME%202.zip
I was able to get the same error as you before calling lein native-deps. I now strongly suspect it's that "lib/*" is not a sufficiently qualified path.
I don't know what the deal is. I downloaded that zip file, unzipped it, went into the directory, ran 'lein repl', and it still just sits there doing nothing.
It's late, I've got to head off for now. Let me know if you're able to run the example in that folder or if you have any other ideas. Thanks for your help so far.
Sorry, I dunno. If I run (main-) at the repl, everything runs. I would focus on getting that working. Uninstall lein and reinstall, maybe?
I don't know either. Leiningen is working fine for other projects with 'lein repl', just this doesn't work. I don't think it's a leiningen issue because I haven't touched that stuff (and did partially reinstall it by wiping out ~/.m2 and running lein self-install)..
I'm guessing something on a higher level is different between our systems, but I've given up for now as this just isn't that important, and in the future if I need to do this I could probably just use a manual Ant script. Still, I wouldn't be surprised if others were experiencing the same issue.
I'm pretty sure the penumbra/lwjgl superjar file doesn't work on OS X. :-\
Please see my comment here: http://nakkaya.com/2010/05/25/jmonkeyengine-hello-world-in-clojure/
I get this error:
Basically, it looks like the lwjgl.jar and native lives in lwjgl-2.4.2.jar aren't getting loaded on OS X when created with the uberjar.
I have to add lwjgl.jar and lwjgl_util.jar to the system-wide java extensions directory (~/Library/Java/Extensions) which get loaded into all java processes. Then I have to manually specify the path to the native libs:
Only then will it work. Here's my project.clj file: