JRuby + LWJGL Help Importing

Starting a project for a Linear Algebra class and I want to display 3D
rotation using JRuby and LWJGL. I already have working code written in
Java, but when I use the same .jar files in my /lib folder of the
project, it can’t find some of the classes.

For example, in the Java file, I can import:
import org.lwjgl.util.glu.GLU; #works!

But when I try to import it in JRuby:
require ‘java’
require ‘lwjgl.jar’

java_import org.lwjgl.util.glu.GLU; #Error!

I get an error with the 2nd; however, SOME of the imports DO work with
JRuby, just not this one and various others = /. If there’s someone out
there who’s done this and has experience with linking JRuby with LWJGL,
I would really appreciate any tips!

Thanks in advance.

It might be because you need to include the shared libraries that
lwjgl has. I do something like this for the lwjgl stuff I do:

-J-Djava.library.path=$SOME_DIR/lwjgl/native/macosx

-Tom

On Wed, Nov 7, 2012 at 7:00 AM, Dave n/a [email protected] wrote:

require ‘lwjgl.jar’

Posted via http://www.ruby-forum.com/.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


blog: http://blog.enebo.com twitter: tom_enebo
mail: [email protected]

Thomas E Enebo wrote in post #1083401:

It might be because you need to include the shared libraries that
lwjgl has. I do something like this for the lwjgl stuff I do:

-J-Djava.library.path=$SOME_DIR/lwjgl/native/macosx

-Tom

On Wed, Nov 7, 2012 at 7:00 AM, Dave n/a [email protected] wrote:

require ‘lwjgl.jar’

Posted via http://www.ruby-forum.com/.


Gotcha, I’m using Windows (my biggest problem) so I’ll have to figure
out a command that does something similar in windows.

You’ve been a big help though, this should fix it, thanks!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs