Anybody know Java? Windows won't let me access more then 64 MB of heap...even when I have increased the heap size way beyond that!
I have tried a Windows advanced server 2003 with 4 GB memory with heap setting of 524 MB and 1 GB as well as Vista machine with 1 GB heap size. The heap always goes to 64 MB and quits.
Good Answers (2)
Milan B
Senior Software Consultant/Engineer (Vendavo, SAP PMM, Ariba, Java/Java EE)
Best Answers in: Computers and Software (1), Software Development (1)
Hi Burke,
to set the initial size and the maximum size of the heap in JVM you usually use these two command-line switches:
-Xms<size> set initial Java heap size
-Xmx<size> set maximum Java heap size
For example:
-Xms512m -Xmx1024m
for the initial heap size half-gigabyte and the maximum size of one gigabyte of the heap memory.
Did you try to use these switches?
Are you sure that the JVM you have problem with is the one executed with these switches?
What JVM do you run? Is it stand-alone JVM or browser plugin?
Borys M
System Architect at Sygnity SA (formerly ComputerLand SA)
Best Answers in: Software Development (4), Computers and Software (2), Databases (2), Enterprise Software (1), Computer Networking (1), Information Security (1), Web Development (1)
Described by Milan Boruvka memory switches first.
type for not standard options help:
java.exe -X
and try:
java.exe -Xms512M -Xmx1024M .....
or:
java.exe -ms512M -mx1024M .....
And Java version next.
What version You are using (1.1, 1.2, 1.3, 1.4, 5, 6) ? From what vendor (Sun, IBM, Apache, BEA, Microsoft, or maybe GNU, Jikes) ?
type:
java.exe -version
Or maybe Your Windows account has some limitations (less possible) ?
What do You have extended Java "heap" or Windows swap ?
Sun's versions work fine on Vista for sure.