rjb heap size OR call ruby methods from java

Discussion in 'Ruby' started by Shashank Agarwal, Jun 29, 2008.

  1. 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/.
     
    Shashank Agarwal, Jun 29, 2008
    #1
    1. Advertisements

  2. Shashank Agarwal

    Axel Etzold Guest

    -------- Original-Nachricht --------
    > Datum: Mon, 30 Jun 2008 01:58:13 +0900
    > Von: Shashank Agarwal <>
    > An:
    > 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
     
    Axel Etzold, Jun 29, 2008
    #2
    1. Advertisements

  3. Shashank Agarwal

    Tiago Macedo Guest

    -----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

    iEYEARECAAYFAkho9BMACgkQxFuRTtCTMvIvcwCfUiWhnnPfs97+6U5z+I8C7Zee
    7ioAoIMgkyNBIPg84eoi4NuEvUYQ3Ahx
    =jxuX
    -----END PGP SIGNATURE-----
     
    Tiago Macedo, Jun 30, 2008
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sunny
    Replies:
    5
    Views:
    2,597
    CBFalconer
    Aug 17, 2006
  2. Michal Slocinski

    Heap dump file size vs heap size

    Michal Slocinski, Mar 25, 2008, in forum: Java
    Replies:
    1
    Views:
    1,090
    GArlington
    Mar 25, 2008
  3. Adam Keys

    rjb and Java 1.5

    Adam Keys, Mar 10, 2006, in forum: Ruby
    Replies:
    0
    Views:
    248
    Adam Keys
    Mar 10, 2006
  4. raf
    Replies:
    0
    Views:
    214
  5. Wes Gamble
    Replies:
    1
    Views:
    249
    MenTaLguY
    Mar 7, 2007
  6. Andre Ferreira

    Ruby and EJavaBeans with RJB

    Andre Ferreira, May 9, 2007, in forum: Ruby
    Replies:
    0
    Views:
    183
    Andre Ferreira
    May 9, 2007
  7. Anukul Singhal
    Replies:
    0
    Views:
    283
    Anukul Singhal
    Mar 9, 2010
  8. Anukul Singhal
    Replies:
    2
    Views:
    598
    Anukul Singhal
    Sep 12, 2010
Loading...