Question

i am currently writing a java program with eclipse on my 64bit Ubuntu laptop. I use a browser from ecplise.swt which has to be 64bit to run in eclipse.

Question is: if i export my program, will it run on an 32 bit linux machine? (specific: Raspbian on a Raspberry Pi)

(side note: I am still having problems with the browser on my ubuntu. question here )

Was it helpful?

Solution

No, it won't, because the SWT library contains native code. But you can easily replace the 64 bit SWT library by its 32 bit version. Then it will work.

There seems to already exist a pre-built 32 bit SWT for raspberry that you can install via apt-get install. For details see http://www.lucid-control.com/create-raspberry-pi-swt-gui-applications-with-java-and-eclipse/

OTHER TIPS

Java programs are not 32 bit or 64 bit. When you compile them, you turn them into byte code that runs on the virtual machine. The virtual machine can be 32 bit or 64 bit just like it can be Ubuntu or Windows.

You should have no problems porting your code.

Java depends on the virtual machine so if the 64 bit VM is installed it should be no problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top