It's not a secret anymore!*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse" Watch "Eclipse" New topic
Author

Eclipse

Pramod R Bhat
Greenhorn

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

Pramod
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

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
Greenhorn

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.

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Eclipse
 
Similar Threads
How do i upgrade jdk version on my eclipse
Rt.jar Has No Source Attached In Ecllipse
Problem with Maven in Eclipse, changing from JRE to JDK
Eclipse IDE and JDK
javac is not recognized when trying to compile a servlet