I've also tried setting the library path on the command line already
like this....

java -cp -Djava.library.path=./jogl-2.0-linux-amd64/lib ~/clojure/
clojure-1.0.0.jar:./jogl-2.0-linux-amd64/lib/jogl.all.jar:./jogl-2.0-
linux-amd64/lib/gluegen-rt.jar:./jogl-2.0-linux-amd64/lib/
nativewindow.all.jar clojure.main test.clj

But that just causes another error.

Exception in thread "Main Thread" java.lang.NoClassDefFoundError: /usr/
home/jstratton/clojure/clojure-1/0/0/jar://jogl-2/0-linux-amd64/lib/
jogl/all/jar://jogl-2/0-linux-amd64/lib/gluegen-rt/jar://jogl-2/0-
linux-amd64/lib/nativewindow/all/jar

I don't know if adding to the library path is causing the new error,
or if this is just the next error in getting the script to run.  Am I
setting the library path incorrectly?

On Mar 11, 5:01 pm, strattonbrazil <strattonbra...@gmail.com> wrote:
> Hrmm, that's weird.  Well thanks for that.  I just put it all on the
> command line for now.  Does -jar ignore -cp or something because that
> didn't work for me?
>
> This is what I got now...
>
> java -cp ~/clojure/clojure-1.0.0.jar:./jogl-2.0-linux-amd64/lib/
> jogl.all.jar:./jogl-2.0-linux-amd64/lib/gluegen-rt.jar:./jogl-2.0-
> linux-amd64/lib/nativewindow.all.jar clojure.main test.clj
>
> I'm past the import errors, so that should be resolved in the future,
> but I'm not at the linking error.  Following the user guide, it says I
> can just set LD_LIBRARY_PATH to the directory containing the .so's,
> but that's not working either.  Can that be set on the command line
> calling java as well?
>
> Thanks.
>
> On Mar 11, 4:05 pm, Zach Tellman <ztell...@gmail.com> wrote:
>
> > In the past, I haven't had a lot of luck putting the JOGL libraries on
> > the classpath.  A much better approach, I've found, is to create a
> > custom script to load up clojure, and put the class and library paths
> > as parameters to the java executable.  My library used to target JOGL
> > (it now uses LWJGL), and the script I suggested in the wiki can be
> > found athttp://wiki.github.com/ztellman/penumbra/getting-started/16.
> > Hopefully some variation on that should work for you.
>
> > On Mar 11, 1:28 pm, strattonbrazil <strattonbra...@gmail.com> wrote:
>
> > > I downloaded the new jogl 2.0 libs and can't get jogl to be recognized
> > > in my classpath.  It's stuck on the import.
>
> > > (import '(javax.media.opengl.awt GLCanvas))
>
> > > In my shell I have clojure aliased to 'java -jar clojure-1.0.0.jar'
>
> > > I have my CLASSPATH as
>
> > > echo $CLASSPATH
> > > ./jogl-2.0-linux-amd64/lib/jogl.all.jar:./jogl-2.0-linux-amd64/lib/
> > > nativewindow.all.jar:./jogl-2.0-linux-amd64/lib/gluegen-rt.jar
>
> > > I found this command online to print the classpath in clojure, which I
> > > assume works.
> > > (println (seq (.getURLs (java.lang.ClassLoader/
> > > getSystemClassLoader))))
>
> > > But I only get the clojure jar.
>
> > > (#<URL file:/usr/home/jstratton/clojure/clojure-1.0.0.jar>)
>
> > > This is the actual error message from the import:
>
> > > Exception in thread "Main Thread" java.lang.ClassNotFoundException:
> > > javax.media.opengl.awt.GLCanvas (test.clj:0)
> > >         at clojure.lang.Compiler.eval(Compiler.java:4543)
> > >         at clojure.lang.Compiler.load(Compiler.java:4857)
> > >         at clojure.lang.Compiler.loadFile(Compiler.java:4824)
> > >         at clojure.main$load_script__5833.invoke(main.clj:206)
> > >         at clojure.main$script_opt__5864.invoke(main.clj:258)
> > >         at clojure.main$main__5888.doInvoke(main.clj:333)
> > >         at clojure.lang.RestFn.invoke(RestFn.java:413)
> > >         at clojure.lang.Var.invoke(Var.java:346)
> > >         at clojure.lang.AFn.applyToHelper(AFn.java:173)
> > >         at clojure.lang.Var.applyTo(Var.java:463)
> > >         at clojure.main.main(main.java:39)
> > > Caused by: java.lang.ClassNotFoundException:
> > > javax.media.opengl.awt.GLCanvas
> > >         at java.lang.Class.forName0(Native Method)
> > >         at java.lang.Class.forName(Class.java:247)
> > >         at clojure.lang.RT.classForName(RT.java:1487)
> > >         at clojure.core$import__4028.doInvoke(core.clj:1860)
> > >         at clojure.lang.RestFn.invoke(RestFn.java:426)
> > >         at user$eval__4.invoke(test.clj:3)
> > >         at clojure.lang.Compiler.eval(Compiler.java:4532)
> > >         ... 10 more

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to