[#413] Should we check alloca ret val? — Michal Rokos <m.rokos@...>
Hi,
7 messages
2002/09/03
[#441] Patch to add a Module#const_missing method — JanArne.Petersen@... (Jan Arne Petersen)
Hi,
11 messages
2002/09/05
[#443] Re: Patch to add a Module#const_missing method
— matz@... (Yukihiro Matsumoto)
2002/09/06
Hi,
[#444] io_write()/fwrite() and EINTR on Solaris — Jos Backus <jos@...>
I am encountering a problem similar to the one mentioned here,
19 messages
2002/09/06
[#453] Re: io_write()/fwrite() and EINTR on Solaris
— nobu.nokada@...
2002/09/08
Hi,
[#454] Re: io_write()/fwrite() and EINTR on Solaris
— matz@... (Yukihiro Matsumoto)
2002/09/09
Hi
[#469] Re: io_write()/fwrite() and EINTR on Solaris
— Jos Backus <jos@...>
2002/09/09
On Mon, Sep 09, 2002 at 03:55:13PM +0900, Yukihiro Matsumoto wrote:
[#479] Re: io_write()/fwrite() and EINTR on Solaris
— Jos Backus <jos@...>
2002/09/10
On Tue, Sep 10, 2002 at 01:04:10AM +0900, Jos Backus wrote:
[#492] Re: io_write()/fwrite() and EINTR on Solaris
— Jos Backus <jos@...>
2002/09/21
On Wed, Sep 11, 2002 at 02:23:33AM +0900, Jos Backus wrote:
[#495] Re: io_write()/fwrite() and EINTR on Solaris
— nobu.nokada@...
2002/09/21
Hi,
[#496] Re: io_write()/fwrite() and EINTR on Solaris
— Jos Backus <jos@...>
2002/09/21
Hello,
[#564] Re: io_write()/fwrite() and EINTR on Solaris
— Jos Backus <jos@...>
2002/11/06
On Sun, Sep 22, 2002 at 04:24:31AM +0900, Jos Backus wrote:
[#566] Re: io_write()/fwrite() and EINTR on Solaris
— nobu.nokada@...
2002/11/07
Hi,
[#567] Re: io_write()/fwrite() and EINTR on Solaris
— Jos Backus <jos@...>
2002/11/07
On Thu, Nov 07, 2002 at 01:43:03PM +0900, nobu.nokada@softhome.net wrote:
[#568] Re: io_write()/fwrite() and EINTR on Solaris
— nobu.nokada@...
2002/11/07
Hi,
[#569] Re: io_write()/fwrite() and EINTR on Solaris
— Jos Backus <jos@...>
2002/11/07
On Thu, Nov 07, 2002 at 03:49:51PM +0900, nobu.nokada@softhome.net wrote:
[#449] ruby.h, string.c — Michal Rokos <m.rokos@...>
Hello,
7 messages
2002/09/06
[#459] Parse.y — Michal Rokos <m.rokos@...>
Hi,
6 messages
2002/09/09
[#461] Related to [Memleak] in sprintf.c — Michal Rokos <m.rokos@...>
Hi,
5 messages
2002/09/09
[#508] can java applications invoke ruby scripts?? — "John Davis" <javaccnews@...>
I want to know if Java applications can invoke ruby scripts?? In other
8 messages
2002/09/26
Re: can java applications invoke ruby scripts??
From:
Anders Bengtsson <ndrsbngtssn@...>
Date:
2002-09-30 10:38:32 UTC
List:
ruby-core #513
Raymond Lee wrote:
> I just downloaded jruby and looked at the samples, but I couldn't see
> documentations or samples show how to invoke Ruby scripts from Java
> applications. I tried
> Runtime.getRuntime().exec("jruby swing.rb"); , but it didn't work. Any
> ideas??
This discussion should probably be at the jruby-user list, but anyway:
If you just need to invoke Ruby scripts, with little or no exchange of
data between them and Java, then you won't even need JRuby. Just launch
the Ruby interpreter from Java, with something like the code you're
using above.
The exec() command that you use runs things outside of Java, which may
or may not be what you want. In any case it's not the best way to use
JRuby.
Try something like this from Java to run Ruby code:
Ruby runtime = Ruby.getDefaultInstance(null);
runtime.evalScript("puts 'hello'");
(I haven't tested the above code, but something like it should work. :-)
> Also, is it possible to pass Java variables in Java program to jruby
> scripts. It needs some kind of bindings..
JRuby has support for accessing Java objects, so with a little ingenuity
you should find a way to get the data you need across. Java's system
properties could be usable for this.
/Anders
--
A n d e r s B e n g t s s o n | ndrsbngtssn@yahoo.se
Stockholm, Sweden |
_____________________________________________________
Fj VM pn舐a h虱l pYahoo!s officielle VM-sajt www.yahoo.se/vm2002
H虱l dig ajour med nyheter och resultat, med vinnare och florare...