This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
While tuning my eclipse.ini file, i noticed, with visualVM, that although the -server parameter was read, the java vm itself was running in client mode.
This will only happen on win32 machines because in 64 bits and other (decent) OS the vm itself is able to determine its mode.
For those interested, here's the data:
Runtime Platform: Hotspot VM (Sun's jdk 1.6.0_14) 32 bits on Windows XP
Eclipse: 3.5 (Galileo)
eclipse.ini file contents:
If you run visualvm and connect it to the eclipse process, you will see the '-server' parameter under the tab 'jvm arguments'. But it shows, in the overview tab, the JVM as 'Java HotSpot(TM) Client VM (14.0-b16, mixed mode)'
I suspect that's related to the equinox's initialization, I tried the -server parameter on other parts of the eclipse.ini file to no avail.
The problem is that "-server" is not a VM argument. Rather, it is an argument that is identified and acted upon by the VM loaded (usually java.exe). I suspect that eclipse.exe is loading the client VM, which then ignores the "-server" option. So the trick would be to get eclipse.exe to recognize that you want to use the server, rather than the client, VM and thus load the proper one. Javier's solution is perfect for this.