Jump to content
Excelsior Forums
Sign in to follow this  
adf

Out of Memory Error with Rhino JavaScript intereter

Recommended Posts

Compiling the rhino interpreter always fails in the same class with an out of memory error. I tried setting the COMPILERHEAP flag to the maximum (which seems to be 1.5 GB) and it still happens. So maybe it is caused by something else?

You can easily test it yourself. Just download the latest rhino from http://www.mozilla.org/rhino/ and build a fat jar containing the js.jar from the downloaded archive and examples/Shell.java as main class.

I attached the build log and the .prj

How can I fix this error?

Untitled.log.txt

Untitled.prj

Share this post


Link to post
Share on other sites

Hello,

Please try to do the following:

go to the page Options, switch to the tab Advanced and add

COMPILEWITHFIXEDHEAP+

COMPILERHEAP=1536m

to the ADDITIONAL OPTIONS, then recompile the sample.

Share this post


Link to post
Share on other sites
Just download the latest rhino from http://www.mozilla.org/rhino/ and build a fat jar containing the js.jar from the downloaded archive and examples/Shell.java as main class.

BTW, why do not you use the Rhino implementation that comes with Sun JRE 6 (and with Excelsior JET) out-of-the-box?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×