More memory to Java

SetJavaMemory is a small Windows program that will assign 200Mb of memory to Sun Java. This is a maximum value: Java will allocate it only if needed.

This program is useful to let end-users easily see large panoramic images in a Java applet.

Publishing a link to an executable program from your site is risky, since you cannot be sure that the program will only allocate more memory to Java: it could also install spyware, for example. For this reason you can download the source code and build the program by yourself: all you need is a computer with Visual Basic 6. The code is simple so every programmer will be able to verify what the program will do.

At the moment the program can run in three languages: German, English and Italian. If somebody wants to translate it to other languages I will be glad to add the new language to the next version.

Just click this link to run or download the program: download SetJavaMemory V1.0

Download source code

 

How does it work?

In Windows 2000/XP computers Sun Java memory settings are stored in the following file: C:\Documents and Settings\<user name>\Application data\Sun\Java\Deployment\deployment.properties, where <user name> it the current username used for login. The folder name is localized so it changes from language to language. SetJavaMemory will only change that file and it will create a backup version: deployment.properties.bak.

It is important that you run only once the program: if something goes wrong you can just recover the backup file renaming it.

Remember that you must restart the browser after running the program.

 

How to test if it worked

This test page can be used to determine how much memory can be allocated by Java: http://www.fsoft.it/temp/memorytest.htm 

You can open it before and after running SetJavaMemory to see if it worked. The page contains an applet that tries to allocate more and more memory until it receives an error. It can take a rather long time, so be patient: at the end you will see a message.

PTViewer home page