This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hello all, I am using the following code to add a file to a jar. It works fine for smaller files, but if the file is over 56MB, it throws and out of memory exception. Any ideas on how I can keep this from happening? thanks, -Jason
Jason R. Kretzer<br />Software Engineer<br />System Administrator<br /><a href="http://alia.iwarp.com" target="_blank" rel="nofollow">http://alia.iwarp.com</a>
You could allow the JVM to use more memory when you start your process. eg. java -Xmx500m -Xms500m MyClass The -Xmx option is maximum memory allowed and -Xms is minimum. The above specifies the use of 500MB of memory for the JVM.