Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

64 bit OS

 
Sahil Sharma
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can we run Eclipse 32 bit and jdk 32 bit on 64 bit OS?
Also classes compiled on 64bit jdk can be run on 32bit jdk

Thanks
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15435
41
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes to both questions.

On normal (Intel-based) PCs, you can run 64-bit as well as 32-bit software if you have a 64-bit operating system.

Note that with Eclipse, the version of Eclipse that you use has to match your Java version - if you have 32-bit Java, you must use 32-bit Eclipse, and if you use 64-bit Java, you must use 64-bit Eclipse. That is because Eclipse uses some native libraries (for SWT), and Java can only load those native libraries if they have the same "bitness" as Java itself.

For Java bytecode, it doesn't matter what the "bitness" of the JDK is. The class files produced by a 32-bit JDK are exactly the same as those produced by a 64-bit JDK. So you can compile on 32-bit and run on 64-bit or vice versa. Java bytecode is independent of the "bitness" of the JDK and the OS.
 
Rob Spoor
Sheriff
Pie
Posts: 20605
60
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried already? Or don't you have a 64 bit OS available?
 
Sahil Sharma
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jesper for clearing this. Really appreciate
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic