Reputation: 6357
Is it possible to allow Java applications to collectively use x%
of my RAM?
Upvotes: 4
Views: 742
Reputation: 4473
If you know your RAM when you run your Java program then simply use -xmx and define how much total memory to use. Xmx is start command parameter and can't be changed dynamically. So, if you want to change it on the fly then you have to calculate it and restart your program with new parameters. Here is good example.
Upvotes: 1