3 messages in net.java.dev.jna.usersRe: [jna-users] Fwd: JNA in JRUBY
FromSent OnAttachments
Timothy WallMay 31, 2007 4:55 am 
Wayne MeissnerMay 31, 2007 5:21 am 
Mike McKinneyMay 31, 2007 2:38 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Fwd: JNA in JRUBYActions...
From:Wayne Meissner (wmei@gmail.com)
Date:May 31, 2007 5:21:00 am
List:net.java.dev.jna.users

That was a pretty quick&dirty example I lashed together just to show what was possible - but it still works - I didn't use "require 'jna.jar'" though.

I ran it thusly: CLASSPATH=~/src/jna-trunk/jnalib/build/jna.jar jruby jna_test.rb

(I know thats not the proper way to do it, but hey, it was demo code).

As Timothy said, you need to check the latest JNA code out of subversion and build, otherwise it won't work.

That ruby example code is also pretty likely to only work on linux/unix.

Timothy Wall wrote:

The code may not be entirely accurate; I copied it from a sample Wayne Meissner had posted.

Could you be a little more specific about the issues you ran into? Note that you'll need to build JNA from source until I get the next release snapshot posted (updating files on dev.java.net is a pain).

Begin forwarded message:

From: "Mike McKinney" <mike@gmail.com> Date: May 31, 2007 1:53:52 AM EDT To: twal@dev.java.net Subject: JNA in JRUBY

Hey there, I'm running into issues with JNA in Jruby and wanted to see if it's something I'm doing wrong.

(ref: http://jira.codehaus.org/browse/JRUBY-1039 )

I downloaded the latest bin dist for Jruby (1.0.0RC2) (usually build it, but wanted a fresh perspective)

I tried the sample Jruby code you have for JNA, downloaded the jna.jar file and put it in the JRUBY_HOME/lib dir... couldn't get things to run and was wondering if there is a trick to this?

I copied your sample code into a file called jna_test.rb and ran:

jruby jna_test.rb

no dice... any help is appreciated as I'm planning on using this combo for an upcoming project.