File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Changing to another JRE in 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 "Changing to another JRE in Eclipse" Watch "Changing to another JRE in Eclipse" New topic
Author

Changing to another JRE in Eclipse

Peter Sorotokin
Ranch Hand

Joined: Jun 25, 2013
Posts: 36
    
    1

Hi
I have a dual boot PC . Both of them Windows . I installed first Windows in drive C: and immediately installed Eclipse and used that , then installed second Windows on drive D: and didn't installed a new Eclipse and used the first Eclipse in second Windows . But when i run Java applications , Eclipse didn't work correctly and it shows that it uses JRE that was installed in C: in the first Windows and i think that it is the source of my problems . How i can change JRE in my Eclipse to the new ones that installed in the second Windows ? Thanks
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

Hello Peter and welcome to the Ranch

JREs can be configured inside eclipse optionally. The settings can be found here windows -> Preferences -> installed JREs. Give the path to the other JRE that you wish to use and it will work fine .

Do post back for any further queries.


Muhammad Saif Asif Mirza
OCJA(5/6) OCJP(6) OCJWCD(6)
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

Another possibility is to edit the eclipse.ini file and add the following lines just before the "-vmargs" line:

-vm
<path-to-jvm>

The <path-to-jvm> cane being a full path to either the java or javaw executables or to the jvm DLL (Windows) or SO (Linux)
For example, on my Windows system I have (I use server because it is a 64-bit JVM):

-vm
c:/apps/Java/jdk-1.7.0_25/jre/bin/server/jvml.ddl

This then becomes the JVM that runs Eclipse itself, and is the also the default JRE. The mechanism Saif describes enables you to identify additional JDKs to use for compiling or running apps.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing to another JRE in Eclipse
 
Similar Threads
JRE install
JDK and JRE installation
Eclipse
compilation or a runtime problem, haha
IDE eclipse