This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse" Watch "Eclipse" New topic


Pramod R Bhat

Joined: Dec 30, 2010
Posts: 3
Hi all, I am curious to know how eclipse finds for an installed JRE when I run eclipse for the first time.

JDK and JRE works fine if i copy the installation folder from one system to other. I need not use the msi or exe to install JDK for the second system. My question is, will eclipse find out whether JRE is installed or not when I first run the IDE after copying JDK and JRE folder in the system.

Thank you

Peter Johnson

Joined: May 14, 2008
Posts: 5852

Eclipse defaults to the Java executable in the PATH. On Windows, this is usually c:\windows\system32\java.exe. The JRE/JDK installation always copies java.exe to that directory. (Actually, thinking about it, I suspect that the java.exe is not even used, but rather Eclipse reads the registry to locate the jvm.dll to load. But the result is the same since the java.exe in system32 also reads the registry to locate jvm.dll.)

If you have multiple JDKs installed and want Eclipse to use a specific one, you can always add a -vm entry to the eclipse.ini file.

JBoss In Action
Pramod R Bhat

Joined: Dec 30, 2010
Posts: 3
Thank you Mr Peter.

But if I just copy the installed JDK and JRE folders to another computer it runs without hassle. When I do so, neither registry entry nor the java.exe would be copied to system32 folder. In that case, how will eclipse find the exact copied JRE from my system. Also I can copy the JDK and JRE folders to anywhere in my new system so that I avoid default place where they are installed using microsoft installer or exe files.

I agree. Here's the link:
subject: Eclipse
It's not a secret anymore!