Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Ruby (http://www.velocityreviews.com/forums/f66-ruby.html)
-   -   rjb heap size OR call ruby methods from java (http://www.velocityreviews.com/forums/t851274-rjb-heap-size-or-call-ruby-methods-from-java.html)

Shashank Agarwal 06-29-2008 04:58 PM

rjb heap size OR call ruby methods from java
 
I've been using rjb (ruby java bridge) to use a method from a Java
library. Problem is, that I run out of heap while running that method.
I'm on a Windows machine, and I increased the max heap size for Java
from the Control Panel, but the problem continued. Is there a way to fix
that?

If not, is it possible to call Ruby methods from Java, something like
Inline? Xruby might help, but I wonder if it could help (never used it,
and the currently reported problems put me off).
--
Posted via http://www.ruby-forum.com/.


Axel Etzold 06-29-2008 06:14 PM

Re: rjb heap size OR call ruby methods from java
 

-------- Original-Nachricht --------
> Datum: Mon, 30 Jun 2008 01:58:13 +0900
> Von: Shashank Agarwal <shashank_hi@yahoo.com>
> An: ruby-talk@ruby-lang.org
> Betreff: rjb heap size OR call ruby methods from java


> I've been using rjb (ruby java bridge) to use a method from a Java
> library. Problem is, that I run out of heap while running that method.
> I'm on a Windows machine, and I increased the max heap size for Java
> from the Control Panel, but the problem continued. Is there a way to fix
> that?
>
> If not, is it possible to call Ruby methods from Java, something like
> Inline? Xruby might help, but I wonder if it could help (never used it,
> and the currently reported problems put me off).
> --
> Posted via http://www.ruby-forum.com/.


There is also jruby ... a Java implementation of the entire (or almost) Ruby language -- with this information on Java integration:

http://jruby.codehaus.org/Java+Integration


Best regards,

Axel
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer


Tiago Macedo 06-30-2008 02:54 PM

Re: rjb heap size OR call ruby methods from java
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I believe that when you load the jvm, you can pass along the max heap
size as a parameter:

Rjb::load(classpath = '.', jvmargs=[])

I haven't used it myself but they should be similar to the command line
arguments:

- -Xms32m -Xmx128m

(these are the defaults which you should increase)

Tiago Macedo

Shashank Agarwal wrote:
| I've been using rjb (ruby java bridge) to use a method from a Java
| library. Problem is, that I run out of heap while running that method.
| I'm on a Windows machine, and I increased the max heap size for Java
| from the Control Panel, but the problem continued. Is there a way to fix
| that?
|
| If not, is it possible to call Ruby methods from Java, something like
| Inline? Xruby might help, but I wonder if it could help (never used it,
| and the currently reported problems put me off).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkho9BMACgkQxFuRTtCTMvIvcwCfUiWhnnPfs9 7+6U5z+I8C7Zee
7ioAoIMgkyNBIPg84eoi4NuEvUYQ3Ahx
=jxuX
-----END PGP SIGNATURE-----



All times are GMT. The time now is 07:53 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.