idea.exe ignores the -server switch in idea.exe.vmoptions?

I read a suggestion somewhere that using the server JVM might make IDEA faster (slower startup though), so I decided to try it out and see for myself. Unfortunately, adding -server to the list of parameters in idea.exe.vmoptions doesn't seem to have any effect.

I confirmed this by looking at the DLLs loaded by the idea.exe process, and it shows that jvm.dll was loaded from $JRE/lib/client/jvm.dll, instead of $JRE/lib/server/jvm.dll. It seems the idea.exe launcher simply ignores the -server option and uses the client JVM anyway.

I have IDEA_JDK set to point to my JDK 6u10 installation (which contains both the server and client jvm.dll in it). IDEA build is #9144, and OS is WinXP SP2.

How to make idea.exe load the server JVM for real?


Try running using idea.bat instead of idea.exe, then it will pick up the -server flag in your idea.exe.vmoptions.



Thanks Bas, never occured to me to try idea.bat.

And I just remembered why I never use it: the annoying empty console window it leaves lingering while IDEA is running. I tried replacing java.exe with javaw.exe in the batch file, but the console window still remains. Any idea how to get rid of it?

The ideal solution here would be if idea.exe itself just honored the -server switch.

Edited by: Ivan Todoroski on Nov 17, 2008 11:49 AM


how about changing this line:




on top of changing JAVA_EXE to point to javaw.exe.

as of the -server switch, I read somewhere that with Idea it only takes effect if it's first of all switches, never checked it though, not sure if it is true. Just put it first anyway.


Putting -server first does not seem to help when using idea.exe. It's still client JVM. Only idea.bat works, and there it does not matter whether -server is first or not.

And all these years I had thought that I was running IDEA in server mode. D'oh!

Is using idea.bat the only way to do it on Windows? Is this some issue with exe4j that it's unable to launch the server JVM?

I found which says on page 16: "Please note that it is not an error if the selected JVM is not present for the found JRE. exe4j will simply use another JVM to launch your application in that case."

It seems that idea.exe has been configured to use the default/client JVM. But since exe4j will fallback to any other JVM if client JVM can not be found, so here is an easy way to force IDEA to use server JVM - you don't even need to specify -server in vmoptions:

1. Go to directory C:\Program Files\JetBrains\IntelliJ IDEA 8.0\jre\jre\bin\
2. Rename the directory "client" to "client.bak"

Now idea.exe can not find the client JVM, and it will start IDEA using server JVM. :)


Thanks Michael, that did it!

I already tried putting "start" in front of the command line, but I got errors. I didn't realize that the first parameter of "start" is supposed to be a window title. Adding the "Idea" parameter after "start" solved the problem, thanks.

The only remaining drawback is that I would have to do these edits, and also edit the Desktop shortcut to point to idea.bat instead of idea.exe after each EAP upgrade... that is if I decide to keep using the server JVM, I haven't yet had a chance to really exercise IDEA with it.

P.S. The position where you put the -server switch doesn't matter, as already noted by another poster, idea.exe simply ignores it.


Esko, renaming the client JVM in IDEA's private JRE is also a great idea, thanks! It's even easier than editing idea.bat and desktop shortcut each time. I may end up doing just that.