-
Notifications
You must be signed in to change notification settings - Fork 43
Getting Started
To get things running, you need to add /src to the classpath, and /lib/* (osx, linux, or windows) to the class and library paths. 64-bit libraries are located at at /lib/*/64, where available. Penumbra relies on, but does not include, clojure and clojure-contrib. Make sure clojure-contrib.jar exists in the root directory. If not, build clojure-contrib using the directions in the repository.
Create a script that looks something like this:
java -cp \
/.../clojure/clojure.jar:/.../clojure-contrib/clojure-contrib.jar: \
/.../penumbra/src:/.../penumbra/lib/osx/jogl.all.jar: \
/.../penumbra/lib/osx/gluegen-rt.jar: \
/.../penumbra/lib/osx/nativewindow.all.jar \
-Djava.library.path=/.../penumbra/lib/osx \
clojure.main
(use 'examples.gears)
. If everything’s in place, you should see a window open with a spinning red gear. If you prefer a game, try (use 'examples.tetris)
.
The above method may not fit well with your preferred workflow. You can also
- Alter environment variables such that your default class and library paths include the above directories.
- Put files in a directory already included in your class or library paths. All jar and clj files must be in your class path, all other files must be in your library path.
Methods of altering environment variables vary widely by platform, and are beyond the scope of this article. You can discover your class and library paths at the REPL by entering (System/getProperty "java.class.path")
and (System/getProperty "java.library.path")
. respectively.
Some errors, and potential solutions:
java.lang.SecurityException: class "javax.media.opengl.GL"'s signer information does not
match signer information of other classes in the same package
You may have multiple copies of JOGL referenced in your classpath. Trim down the references until only the ones above remain, and see if the issue persists.