开发者

Memory Limit for Jython

开发者 https://www.devze.com 2023-02-12 03:19 出处:网络
How can I set the JVM memory limit (-Xmx option for Java) for my Jython 开发者_开发百科program?

How can I set the JVM memory limit (-Xmx option for Java) for my Jython 开发者_开发百科program?

I understand that Jython 2.5 introduces the -J option in order to send options to the JVM:

jython -J-Xmx8000m

However, I have to work with Jython 2.2a0 on java1.6.0_23, which does not have that option.


You could set environment variables JAVA_OPTIONS (for jython < 2.5) or JAVA_MEM for jython 2.5 e.g.:

alias jython1G="JAVA_OPTIONS=\"-Xmx1000m $JAVA_OPTIONS\" /usr/bin/jython"


You could just edit jython.bat(windows) or jython(Linux) and add it.

"C:\...\java.exe" -Dpython.home="C:\..." -classpath "C:\...

to

"C:\...\java.exe" -Xmx1024m -Dpython.home="C:\..." -classpath "C:\...
0

精彩评论

暂无评论...
验证码 换一张
取 消