• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

How can I have both x64 and x86 of JDKs to co-exist in my machine?  RSS feed

 
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JAVA_HOME can contain one variable,
and I think it is very easy to mess up, if I put the x86 path first,
When I compile x64 java applications, the process will terminate and it is very easy to forget which is which...
Thanks
Jack
 
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you want to have both x86 and x64 JDK? The compile bytecodes are the same whether you use x86 or x64. The only difference is probably in the runtime where x64 can use maximum memory just like Windows 64-bit OS (can use more than like 3GB if machines has >3GB RAM).
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

K. Tsang wrote:Why do you want to have both x86 and x64 JDK? The compile bytecodes are the same whether you use x86 or x64. The only difference is probably in the runtime where x64 can use maximum memory just like Windows 64-bit OS (can use more than like 3GB if machines has >3GB RAM).



I see.... So I will keep on using x86 version
Thanks
Jack
 
Java Cowboy
Sheriff
Posts: 16084
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can install different JDK versions, or the same version for different architectures (x86 and x64) in different directories on your system.

Note that JAVA_HOME is not used by the JDK or JRE itself. Some third-party software uses this to locate the Java installation, but Java itself does not require JAVA_HOME to be set.

As K. Tsang already noticed, there is no such thing as a "32-bit Java application" and a "64-bit Java application". The byte code that the Java compiler produces is exactly the same, no matter if you use the 32-bit or 64-bit JDK, and programs compiled with one will also run on the other.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!