views:

86

answers:

2

Hi guys,

I would know if is possible compile a java desktop application in 32bit application from Windows 7 64bit using Netbeans.

Thx you for HELP.

+5  A: 

Java doesn't build 32-bit or 64-bit applications - bytecode is portable across architectures.

If you rely on any native libraries, you'd have to potentially ship both versions of those - but the actual Java code won't need to be recompiled.

Jon Skeet
@Jon I'm your fan. :)
pavanlimo
@Jon I'm your fan too, and that has nothing to do with this answer.
Here Be Wolves
+6  A: 

You don't have to build java code for 32-bit or 64-bit platforms. The code is compiled to byte code which is run by JVM. You can use 32-bit or 64-bit JVM to run your java code.

The only exception is native libraries that you might be using in your code. If there are any then you will have to manually compile those for the respective platform. Otherwise the java code is totally portable across 32-bit and 64-bit platforms.

Write once and run everywhere :-)

Faisal Feroz
I like it - write once run everywhere.
Tingu
@Tingu Or write once, debug everywhere. ;) The principle is great, but sadly it doesn't always work.
Carlos
@Tingu: The principle is usually referred to as WORA - Write Once, Run Anywhere
R. Bemrose