4

The Java project I am working on needs to be tested for 1800 configurations. I have created a perl script for this and running it on cygwin.

Some of these configurations require more heap space than the default available space. How can I specify the heap size in perl script?

I have tried these commands but they didn't work.

system('java -Xmx512m');
system('java -xmx1g -xms512m');
system("java -Xmx512m -jar foo.jar');
3
  • I don't believe that your answer is cygwin related. Mar 30, 2012 at 6:23
  • 2
    How did they "not work"? Mar 30, 2012 at 6:41
  • @IlmariKaronen I got an error message Failed to load Main-class manifest attribute from foo.jar and then program used default heap size Mar 30, 2012 at 6:43

2 Answers 2

3

try the following:

system('<full path to java>/java -xms512m -xmx1024m -cp <full classpath> -jar <full path to your jar>/foo.jar')
0
2

If possible, I always try to use the system PROGRAM, LIST way, and with complete paths, if I know them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.