 |
Forums |
Admin Discussion Forums: help Start New Thread
By: Alex Porras
RE: unloading the jvm throws errors [ reply ] 2013-01-09 17:34
|
Hello,
Thank you for your response. I have read the link you provided and did some searching online, and it looks like I have nothing useful I can offer as an alternative, other than perhaps catching an exception on close and printing a custom message to allude to the fact that the problem stems from JNI.
What do you think?
Cheers,
Alex
|
By: Alex Porras
unloading the jvm throws errors [ reply ] 2013-01-07 23:43
|
I am using RJB to run some java code from a third party jar. The code runs as expected. However, there seems to be a memory leak somewhere between the java code and the local ruby code.
Long term, I may go as far as profiling the Java code in segregation to see if the cause is there.
Short term, I was wondering if it was possible to unload the JVM on demand? I tried invoking Rjb::unload after running the code in the jar file I needed, but it throws errors, usually along the lines of not being able to call "close()" on certain objects, which varied randomly on each execution.
On occasions where Rjb::unload did work, subsequent Rjb::load calls would fail with "can't create Java VM" errors.
Any help would be appreciated.
Thanks!
--
version info:
mac os x mountain lion, 10.8.2
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.2.0]
|
|
 |