cancel
Showing results for 
Search instead for 
Did you mean: 

How to increase Java heap size for Program Objects?

Former Member
0 Kudos

I wrote a Java program object for XIr2 that is running into some OutOfMemory errors when opening reports with large data sets. How can I increase the heap size for my Program object? This would be similar to the java command "java -Xms64m -Xmx256m <class>" to set the initial and maximum heap sizes. I didn't see any options for this in the CMC or as a command line parameter to the Job Server in the CCM.

Thanks,

Ryan

Accepted Solutions (1)

Accepted Solutions (1)

ted_ueda
Employee
Employee
0 Kudos

Log onto the CMC, and in the "Arguments" field for the Program Object Process -> Parameters, add the following:

{-jvmArgs -Xms64m -Xmx256m}

and that will add the contents to the Java exe command-line.

Sincerely,

Ted Ueda

Former Member
0 Kudos

As always, the man with all the answers comes through! Thanks Ted!

Former Member
0 Kudos

After some additional testing, I'm having another problem -- my app takes command line arguments as parameters. I've tried to combine the required arguments with the -jvmArgs flag in a few ways.

1. "Argument1 -jvmArgs -Xms64m -Xmx256m" -- the app thinks there are no arguments supplied

2. "-jvmArgs -Xms64m -Xmx256m Argument1" -- the JVM thinks that Argument1 is my Java class name

What's the solution to this?

On a related note, are there any other flags available aside from -jvmArgs? Is this documented somewhere?

ted_ueda
Employee
Employee
0 Kudos

Did you mean:

{-jvmArgs -Xms64m -Xmx256m} Argument1

Sincerely,

Ted Ueda

Former Member
0 Kudos

That was it, I glossed over those braces. Adding that works brilliantly, so thanks yet again.

Is there a document somewhere that explains this and other options available when working with Program objects? I don't recall seeing it in the Dev Library anywhere, but I could have easily missed it out there.

ted_ueda
Employee
Employee
0 Kudos

Happy to hear it's working for you!

Unfortunately, there's no documentation that I'm aware of.

That particular option was added not at release but with XI Release 2 Service Pack 1.

Sincerely,

Ted Ueda

Answers (1)

Answers (1)

Former Member
0 Kudos

Marking question as unanswered -- see above

Edited by: Ryan Muldowney on Jun 16, 2008 8:46 PM