Forum: JRuby JRuby + LWJGL Help Importing

Posted by Dave n/a (djmill)
on 2012-11-07 14:00
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.
Posted by Thomas E Enebo (Guest)
on 2012-11-07 17:10
(Received via mailing list)
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 <lists@ruby-forum.com> 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: tom.enebo@gmail.com
Posted by Dave n/a (djmill)
on 2012-11-07 19:49
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 <lists@ruby-forum.com> 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!
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.