Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Getting Started

ztellman edited this page Sep 13, 2010 · 37 revisions

To get things running, you need to add /src to the classpath, and /lib/* (osx, linux, or windows) to the class and library paths. 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
At the REPL, type (use 'examples.gears). If everything’s in place, you should see a window open with a spinning red gear.

Alternate approaches

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.

Troubleshooting

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.

Clone this wiki locally