This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "64 bit OS" Watch "64 bit OS" New topic
Author

64 bit OS

Sahil Sharma
Ranch Hand

Joined: Aug 27, 2003
Posts: 152
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

Joined: Aug 16, 2005
Posts: 13869
    
  10

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 7 API documentation
Scala Notes - My blog about Scala
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

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


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
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
 
 
subject: 64 bit OS
 
Similar Threads
Downloading JDK for win 32 bit
64 bit OS on 32 bit system?
Time for a new Windows 7 PC : Any recommendation on specs?
Java in 64 bit Linux
Since I want to use maven in my IDE should I dump eclipse for intellij