This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
Getting Started
ztellman edited this page Sep 13, 2010
·
37 revisions
Penumbra relies on the following:
- Current versions of clojure and clojure-contrib.
- Penumbra doesn’t target a particular version, but does not work with Clojure 1.0. If you’re getting errors, clone the latest repositories and try again.
- clojure-contrib must be pre-compiled. If clojure-contrib.jar doesn’t reside in the root directory, build it using the directions here.
- /src needs to be added to the classpath, and /lib/* (osx, linux, or windows) to the class and library paths.
- 64-bit libraries are located at lib/*/64, where available.
The easiest way to satisfy the last requirement is 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.