And to my surprise, not only my Java applications are much faster, but the entire desktop is much more responsive. Eclipse is always available, it doesn't stuck for few seconds after it was minimized or in background.
As Keep resistant do it by calling Windows API (SetProcessWorkingSetSize() and VirtualLock()), it would be nice to have such functionality as library which you can call from your application. This way, you could add it to your application and are not dependent of swap memory configuration of the PC.
Update Checking further, I found the following Swap file tweak: "Open the System Configuration Utility by typing msconfig.exe in the RUN command. There in your System.ini you have to add "ConservativeSwapfileUsage=1" under the 386enh section."
It tells Windows not to use any Swap File until there is really no more free RAM left.