Solved

How do I switch back and forth from JRE 32 bit and 64 bit versions

Posted on 2014-02-13
6
709 Views
Last Modified: 2014-02-14
At one point I though I could switch between JREs by opening up the javacpl in 32bit and adding additional entries under the java tab see my screenshots

But that does not seem to work. Does anyone know how best to select each of these ?

Also the same question also regarding the JDK 7 update 51 s both 32bit an 64bit?
How to select In Eclipse if I specify the JRE as 64 bit does it use the JDK tools etc... from its respective 64bit install?

sample pic of java cpl   java tab
0
Comment
Question by:Robert Silver
6 Comments
 
LVL 2

Author Comment

by:Robert Silver
ID: 39858061
In the example there It would appear one could switch between JREs simply via the javacpl but that is cleary wrong because I go into cmd prompt and type java -version and the 64-bit version always shows up
C:\>java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
0
 
LVL 2

Author Comment

by:Robert Silver
ID: 39858087
Note that it appears there are in fact 2 javacpl.exe programs and data
when run from  c:\program files(x86)\java\jre7\bin\javcpl.exe
and c:\program files\java\jre7\bin\javcpl.exe

and they are different

but again which takes precedence and how is that determined?
0
 
LVL 62

Expert Comment

by:☠ MASQ ☠
ID: 39859471
Apologies if I've misread what you're asking.

Some applications require you to explicitly set the path to the Java components, that may be what you are referring to in your first question.

The installation packages include both 32 and 64 bit versions

Unless you are explicitly running Java within a 64 bit environment the 32bit version will run
eg even in a 64bit OS your borwser is likely to be 32bit and so the 32bit JRE will run within it.

Similarly a 64bit app will run 64bit JRE but a 32bit app in a 64bit environment will use 32bit JRE

You have the option to launch a 64bit version of IE in which case the 64bit JRE will be used.

As end-user you shouldn't need to switch between bit-versions, the most appropriate version should be called automatically.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 42

Expert Comment

by:Davis McCarn
ID: 39859541
In your own picture from the original question, what happens if you switch which one is "enabled"  You may need to change both the user & system tabs plus reboot to effect the change.
0
 
LVL 34

Accepted Solution

by:
Gary Patterson earned 500 total points
ID: 39859556
When you invoke Java.exe (or any other exe) from the Windows command line like that, Windows searches the current directory first, and then the Windows PATH environment variable.

http://docs.oracle.com/javase/tutorial/essential/environment/paths.html

Eclipse allows you to install multiple JDKs, select a default JRE, and to assign a specific JRE to different projects (regardless of how the Windows PATH is configured on your development machine).

http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftasks-JREs.htm
0
 
LVL 2

Author Closing Comment

by:Robert Silver
ID: 39859824
Giving me links was one thing but the trick really seems to be that
the path has to be put up front. I am a bit surprised since no mention of Java appeared in my path preceding it.
It seems that the of PATH makes this switch work actually, however, how this exactly works within a given browser seems somewhat hard to determine at runtime
Specifically because Microsoft IE 11 which used to come in two flavors when it was version 10
the 64bit version could easily be distinguished and one would imagine 64bit JREs would be invoked. I guess enabling the JavaConsole from javacpl.exe remains the only way to truly see which version is running
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now