Wednesday, April 2, 2008

Win32OLE Library for JRuby?

Charles O. Nutter of the JRuby project is seeking proposals for Google's Summer of Code (GSoC).

Among the suggested projects is this one of possible interest to many [J]Ruby on Windows users:

Win32OLE Library for JRuby - Implement the win32ole library for JRuby. This would also be an excellent contribution, since there's already libraries like Jacob to take some of the pain out of it, and it would be great to have it working on JRuby. (suggested by sgwong)

Update from Charlie:

BTW, if you know anyone that might be interested in doing this through GSoC, please spread the word quickly. The deadline for submissions is Monday, April 7, so there's not a lot of time left.

And to make it more attractive, there's already a very nice Java library that provides COM/OLE support (http://danadler.com/jacob/) so the task is more about wiring that library into JRuby than mucking about with any low-level native nasties.

I'd love to see this project undertaken, as it could be a big boost for those of us who currently do COM automation work with Ruby. I haven't done much with JRuby yet (a wee bit of Jython in the past), but I like the possibilities for having an easily-distributable app (JAR file?) that includes a GUI (e.g., Swing) and Win32OLE functionality.

What do you think? Would a Win32OLE library increase the likelihood of you using JRuby for some future projects?


Digg my article

12 comments:

dan said...

Absolutely.

I've toyed with the idea of starting this up, but it's a good chunk of work for one busy person to do.

Hopefully the GSoC can knock this one on the head.

Then we can try and get JRuby running nicely on OpenVMS:

:)

bbiker said...

I would be more inclined to use JRuby if I could use Win32OLE functionalsliyy. For example, I am currently using Ruby to interface with OpenOffice.org via their UNO Bridge which depends on Win32OLE to talk with Ruby.

Charles Roper said...

This would be brilliant. I've been meaning to learn Java for a while now and this would be the perfect gateway.

Charles Oliver Nutter said...

BTW, if you know anyone that might be interested in doing this through GSoC, please spread the word quickly. The deadline for submissions is Monday, April 7, so there's not a lot of time left.

And to make it more attractive, there's already a very nice Java library that provides COM/OLE support (http://danadler.com/jacob/) so the task is more about wiring that library into JRuby than mucking about with any low-level native nasties.

David Mullet said...

Thanks, all.

I've inserted Charlie Nutter's comments into the article, to call attention to the upcoming GSoC deadline.

I've also submitted it to DZone in the hopes of spreading the word quickly over the next few days.

Guillaume Laforge said...

We've had good success using Jacob in the Groovy Scriptom module. You may have a look at the code base to learn about the best ways to use Jacob. It can be tricky at times with applications which behave differently from one to another wrt COM handling.

Mark Thomas said...

Personally, I'd like to see a Windows port of libxml-ruby.

Wardamo said...

This comment is not realy related to this post, but i like your blog, we look to be not much ppl who use ruby on windows, and I have a question:
¿How can I make an exe file or an instaler from a ruby source file? I looked in much places but i only found how to do that on windows. Thnx for your help

Wardamo said...

I said:
but i only found how to do that on windows.
I meant:
but i only found how to do that on linux.

Daniel Berger said...

If we can get our pure Ruby version of win32-ole done, then all you'll need is to make win32-api work.

win32ole.c is a 6000 line monster, though.

HomeyD5 said...

Any update on the Win32OLE functionality for JRuby? I'm working on a multi-threaded WMI server inventory script; works like a champ in MRI single threaded, but JRuby's concurrency will make it much better.

roger ward choirist said...

Looks like one has been created for jruby (though it's not extremely thread safe--your best bet is to go multi process, I guess).

related:
http://jira.codehaus.org/browse/JRUBY-5423
http://jira.codehaus.org/browse/JRUBY-5424
http://jira.codehaus.org/browse/JRUBY-191