By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,469 Members | 996 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,469 IT Pros & Developers. It's quick & easy.

Exception in thread "main"

P: 4
I am getting the error: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space.
3 Days Ago #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 202
Use the -xms and -xmx flags to allocate more memory.
3 Days Ago #2

P: 4
okay i will try that.
2 Days Ago #3

Expert 100+
P: 202
The default memory is usually 64m. So I believe -Xmx256m would work well. More options to control memory use can be viewed by the java -X command.
2 Days Ago #4

Post your reply

Sign in to post your reply or Sign up for a free account.