Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When running my java program, I get following error:

Exception in thread "main" java.lang.OutOfMemoryError: Requested array size exceeds VM limit

I am wondering how I can increase the limits on my system, so that my program does not crash. Also, how can I print the current limits?

share|improve this question
1  
Check this answer on StackOverflow. Also instead of increasing memory you might want to check why your application uses so much (unless it is supposed to be memory heavy because of the used algorithm). –  Baarn Dec 4 '13 at 10:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.