File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes 64 bit OS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "64 bit OS" Watch "64 bit OS" New topic

64 bit OS

Sahil Sharma
Ranch Hand

Joined: Aug 27, 2003
Posts: 152

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

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15092

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.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Rob Spoor

Joined: Oct 27, 2005
Posts: 20276

Have you tried already? Or don't you have a 64 bit OS available?

How To Ask Questions How To Answer Questions
Sahil Sharma
Ranch Hand

Joined: Aug 27, 2003
Posts: 152
Thanks Jesper for clearing this. Really appreciate
I agree. Here's the link:
subject: 64 bit OS
It's not a secret anymore!