How to set the java for different environments - java

I've windows 64 bit system.
In this I have installed java 64 bit version and I've downloaded the eclipse indigo of 64 bit also. I've set the JAVA_HOME path to this 64 bit java installation location. I'm using this for J2EE development. Everything is fine up to this.
Now I've downloaded the 32 bit version of java and installed in my system and also I have downloaded 32 bit version of eclipse. Now I want to use this for android development. So how could I set the class path of this 32 bit version java.
How could I use both on my machine.
I'm looking for your replies.
Thanks

What matters is not what is used for running Eclipse but what is used for compiling your code. You can set this #
windows->preferences-java-installed JREs

The build environment uses different java version based on the configuration. you can install any number of Java version (X86 or X64).

Related

Getting java runtime enviroment not found error while running .exe file produced bt jar2exe software

I am getting the following message immediately after trying to run the executable file.
Java Runtime Environment not found.
I have installed jdk and jre and already set the path for both and able to run any class file with command prompt.
Unfortunately, i am not using Netbeans or Eclipse.
please someone help
Thanks in advance.
I found jar2exe website support that include install 32 bit jre for 32 bit OS and 64 bit jre for 64 bit OS. The best solution is reinstall correct version of Java and choose offline installer (since online installer mostly install 32 bit before, but I don't sure is smart enough to detect 32 bit or 64bit now).
(I'm sorry that I don't gain enough reputation to post on comments)
You need an appropriate jre installed that is the same with your Jar2Exe (on step 6 during Exe creation). If you're check "Create 64 bits executive" on those step you'll need 64 bit jre, but if you unchecked it then you need 32 bit jre.

32 bit Eclipse: JRE and JDK versions needed

Apologies in advance. I know this is a basic question.
I am new to server administration. I am administering a server where the users do Java development.
They have a Java-based application and do development in Eclipse. Eclipse is 32-bit. The OS is 64-bit.
I recently updated the JDK and JRE on the server. I have both the 64-bit and 32-bit of each installed.
Eclipse ran into an error where it couldn't start after I had updated to the new JRE and JDK. So I took some advice online and updated the -vm path in the Eclipse .INI file to point to the new 32-bit JRE path. It now works.
I have two main questions:
Will updating the JRE and JDK EVER cause an issue with development, or as long as they can open up Eclipse and use at least one version of the JRE or JDK, they will be fine? I guess my fear is that they are going to develop in a certain version and the next version will cause issues down the line.
They develop in 32-bit Eclipse (not sure why they chose 32-bit) but their application runs with 64-bit Java (that is where the path points to for that installation). If something is developed in 32-bit Eclipse can it run with 64-bit Java? Side question: is there a certain advantage with developing with 32-bit Eclipse on a 64-bit system or is it personal choice?
Thanks a lot and cheers!
I guess my fear is that they are going to develop in a certain version and the next version will cause issues down the line.
Java 6 and 7 are end of life; Java 8 code should still be run when Java 9+ rolls out. I've not been aware of any backwards compatibility issues in recent years, it's only forward compatibility that doesn't work (running Java 8 compiled libraries with JRE 7).
They develop in 32-bit Eclipse (not sure why they chose 32-bit) but their application runs with 64-bit Java
The IDE and code run in separate processes. There's no harm in using the 64bit JDK with 32bit editor.
Eclipse 32 bits running on 64 bits JVM
Should I use Eclipse 32bits or 64bits on my new machine?
Will updating the JRE and JDK EVER cause an issue with development...
I believe it technically could render what you developed "obsolete" if you're initially using one JDK with some specs and change for another one with specs that are not "compatible" with what you built so far. By specs, I mean the libraries, tools, etc that the JDK contains. But I would say it would be unlikely that such problems occur. It personally never happened to me. I'd like to have someone with more knowledge give more details though and validate what I'm saying or correct me if I'm wrong.
If something is developed in 32-bit Eclipse can it run with 64-bit
Java?
To my knowledge, there are not related things. In my mind, Eclipse is just your IDE and it allows you to build/compile code using specific JDK (32 or 64 bits). As a matter of fact, you don't even need eclipse to build code but you definitely need a JDK: it's the JDK that give you the tools to compile code that "targets" a specific JRE/JVM and Eclipse is using the tools your JDK provide.
So yes, you can use eclipse 32 bits to build code for a 64 bits JRE.

Openfire server is not starting on JAVA 64 bit

i was trying to install openfire in my windows 64 bit OS, but server was not starting , and giving below error message.
which says JAVA_HOME doesn't point to 32 bit JRE,
where as in openfire site, nothing was said about 32 or 64 bit jdk version.
upon clicking ok i am getting serious of error messages,
do i need to point openfire to 32 bit jdk and jre to make it workable?
It is possible to start openfire from command line:
java -jar startup.jar
Assuming it is executed from ./lib of openfire installation dir, and you have binaries of your preferred java in system path.
The error means exactly what it said. You have either installed the wrong architecture flavor of Java / the JDK or haven't installed Java at all. If you haven't installed the 32-bit JDK yet, grab it at http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html and install it. If you already have the 32 Bit JDK, change the environment variables of your system to let JAVA_HOME point to the correct installation. Refer to https://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/ for further instructions. If that doesn't help, deinstall every JDK inst install the 32-bit JDK from scratch.
i have downloaded zip version of openfire , which is having this issue, i have downloaded .exe version with jre bundled, which is working fine.

Which eclipse galileo version is supported by jdk 1.7.0_71

i have downloaded and installed jdk 1.7.0_71 on my windows 7 home basic 64 bit lenovo laptop.
Now i need to download IDE.
I was recommended to install eclipse Galileo( as i will be using the same in future) IDE for Java EE Developers but i cant find 64 bit version on eclipse website.
Only 32 bit windows version is available.
Will the 32 bit version works for 64 bit and will it be compatible the jdk i have installed?
There is no 64 bit version because 64 bit Windows was not very popular at the time Galileo was released. You need 32 bit JDK to use 32 bit Eclipse. It should work on 64 bit Windows though. Are you sure you are supposed to use 6 years old Eclipse?
JDK and Eclipse are both different they are not dependent on each other, but if your system is 64bit then use JDK and eclipse 64 bit. you can download eclipse from here you can go for eclipse Luna it is latest release.

How to install both 32 and 64 bit versions of Java on the same computer

I need both Java 32 and 64 bit versions on my workstation, but when I try to install the 32 bit version it says I already have another Java version installed. This is for Java version 7 update 9. I can't delete the existing version via the configuration page, I tried a couple other things but I'm not very good with computers and so far nothing has worked. Can somebody please help? I have windows 7
Works just fine for me. But I don't use java.com, I just download the runtime installers from oracle.com.

Categories