How do I limit Java application memory on my VPS Hosting?

Java has always been known for resource hogging when it comes to memory utilization. However, in some cases the memory hogging simply becomes unbearable, especially when it’s on a VPS hosting account. This is why we’ve made a short tutorial explaining how to limit the amount of application memory that is allocated when compiling a java application in a VPS hosting account.

Please note that the example found below takes into account that you only wish to provide your Java application the maximum of a 128MB of memory on your VPS hosting account when compiling a Java application. Please feel free to adjust the amount of memory based upon what you wish to provide to your java application.

/usr/local/jdk/bin/javac -J-Xmx128

If you have any further questions about Java, please feel free to get in contact with ourĀ VPS hosting support team and they will be glad to assist you further.