Is Java real cross-platform?

morulis

Member
Mar 5, 2005
89
0
0
I would like to know if Java is real cross platform? If I write a program on Linux using Java, is sure that the program will have the same behavior in Windows?(GUI,databases,etc)

:)
 

ArmchairAthlete

Diamond Member
Dec 3, 2002
3,763
0
0
No, it's not "sure" that it'll run the same. Plus you sometimes have to code expecting cross-platform use...

It's supposed to be "write once, run anywhere" but it's not completely true.
 

AmigaMan

Diamond Member
Oct 12, 1999
3,644
1
0
Originally posted by: morulis
I would like to know if Java is real cross platform? If I write a program on Linux using Java, is sure that the program will have the same behavior in Windows?(GUI,databases,etc)

:)

For the most part it is. I can write a J2EE application that runs within an application server on Windows and Linux and both run fine. Some applications are harder than others to write cross platform such as games or Swing/SWT based apps.
 

sigs3gv

Senior member
Oct 14, 2005
513
0
0
The placement of GUI Objects differ by pixels when running in Windows and Linux.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
I've been in a situation where development and testing happened on windows and deployment happened on AIX with very few problems and no special precautions taken. Problems did exist, but they were all environmental, like limits on the size of path strings. You can shoot yourself in the foot as a developer but common sense can usually avoid those situations.

Of course, if you are specifically leveraging platform specific technologies (like maybe gui toolkits or any other sort of native library) then you do have to be a little more careful.

Edit: of course there is the whole problem with there only being decent jdks available on a limited number of platforms. That is a real hindrance to portability but there are people working on it :)

Edit2: removed a quote-fix that was in somewhat bad taste...