how to increase memory for the jvm through jniport?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to increase memory for the jvm through jniport?

Tudor Girba-2
Hi,

When using JNIPort I am getting a "java.lang.OutOfMemory: Java heap space". To go around this, I would need to provide more memory to the JVM.

Essentially, I would like to provide the correspondent of a command line like:
java -Xmx4000m

How should I do this?

Cheers,
Doru

--

"Every thing has its own flow"
Reply | Threaded
Open this post in threaded view
|

Re: how to increase memory for the jvm through jniport?

Tudor Girba-2
Hi Joachim,

Do you happen to know how to set the Xmx for the JVM through JNIPort?

I have this one right now, but I am not sure it's correct:

jvmSettings := JVMSettings new.
...
jvmSettings runtimeSettings addOption: 'Xmx4000m'.
^ JVM newWithSettings: jvmSettings

Cheers,
Tudor


On Fri, Aug 7, 2015 at 8:29 AM, Tudor Girba <[hidden email]> wrote:
Hi,

When using JNIPort I am getting a "java.lang.OutOfMemory: Java heap space". To go around this, I would need to provide more memory to the JVM.

Essentially, I would like to provide the correspondent of a command line like:
java -Xmx4000m

How should I do this?

Cheers,
Doru

--

"Every thing has its own flow"



--

"Every thing has its own flow"
Reply | Threaded
Open this post in threaded view
|

Re: how to increase memory for the jvm through jniport?

Joachim Geidel
Hi Tudor,

it should be
    jvmSettings runtimeSettings addOption: '-Xmx4000m'.
The options are added with exactly the same string which is used in command lines.

You can check the value of an option by using java.lang.System.getProperty() if it is a "-Dname=value" option. For -X options, it is not as simple as that, see e.g.
https://technology.amis.nl/2008/12/03/accessing-jvm-arguments-from-java-to-determine-if-jvm-is-running-in-debug-mode/

HTH
Joachim

Tudor Girba-2 wrote
Hi Joachim,

Do you happen to know how to set the Xmx for the JVM through JNIPort?

I have this one right now, but I am not sure it's correct:

jvmSettings := JVMSettings new.
...
jvmSettings runtimeSettings addOption: 'Xmx4000m'.
^ JVM newWithSettings: jvmSettings

Cheers,
Tudor