views:

106

answers:

6
+3  Q: 

32/64 bit eclipse

  • On 64-bit openSUSE Linux, can a 32-bit eclipse running with 32-bit JVM compile code for a 64-bit system?

  • Is this setup possible? (Installing and running eclipse/java 32-bit on a 64-bit system)

+7  A: 

If you're building pure Java, there's no such thing as compiling for a particular architecture - Java bytecode is portable across CPU architectures and 32/64-bitness.

If you want to compile another language (such as C++) then it gets a bit harder. Likewise you may find problems if you try to build JNI wrappers for one architecture on another.

Jon Skeet
+3  A: 

When you compile in Java there is no notions of 32/64bits it's just java Bytecode. So yes, you can compile java in a 32bits environment and run it in a 64bits one.

Colin Hebert
+2  A: 

The compiled Java program is always identical as Java runs through the Java virtual machine which handles the architecture and native calls. A Java program is not fully compiled all the way to machine code, only up to bytecode for the virtual machine. This means that a Java program can work on any architecture.

Delan Azabani
+1  A: 

Hello!

As i remember there are some XUL library which depends of processor architecture.

So the way you need is emulate/virtualize eclipse environment x86 to run inside of x64 environment.

So the most expected exception should be XUL libraries error.

And one another life-hack could be switching to x64 libraries in x86 eclipse package, but its not guaranteed.

So, try to install x86 eclipse application to your environment and post here logs.

Regards Eugene

Eugene
If so, then they link to native code which is usually the last resort in Java.
Thorbjørn Ravn Andersen
A: 

Check answers for question http://stackoverflow.com/questions/3446275/java-programing-for-64-bit-jvm

It should not matter when you compile java code whether you compile for 32/64 bit.

YoK
+1  A: 

The crucial point is the JVM you choose to run Eclipse iwth and your final program.

If all your code is Java then the result can run on either. The most visible difference is the amount of memory that a program can actually use, where the 64-bit JVM allows for more than the 32-bit JVM.

Thorbjørn Ravn Andersen