I have a java application that will run as a windows service processing files. When I process a 5mb file with-in the RAD IDE it works fine but when running as a windows service I get an out of memory error. Can someone shed some light on this?
You can use the -Xmx option when running a Java program to set the maximum amount of memory that the JVM will allocate. I think that on Windows, the default is 64 MB, which might not be enough for your application. Try running it like this, for example:
java -Xmx256m com.mypackage.MyMainClass
to set the max. to 256 MB, and see if that solves the problem.