ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Removed Areas > Java

Multiplatform...

(1/1)

jeremejazz:
hi, I am programming in JAVA in windows, I haven't tried it on other OS. Will the object files (.class, .jar) produced in windows run on Linux and other operating systems that support Java? I was thinking that you would have to compile the source code there again.

f0dder:
If you stick to core java (ie., no JNI, and be careful about stuff like launching external processes), don't depend on OS-specific file locations, et cetera... then your .jar files will execute on other platforms without recompiling.

jeremejazz:
thanks. Im still using java 1 ;D

Eóin:
As you develop you should test your programs on another OS, say Linux in a VM for simplicity. Ideally you would test on all target platforms but even just testing on two separate OS will help you get a good idea what's portable and what's not.

Navigation

[0] Message Index

Go to full version