Nat101,
Java is really 99.9 % platform independent,
but not database independent.
If your Java app originally developped under
Windows has a hardcoded file name, say
C:/mydir/myfile.ext (Java handles / in Windows properly)
this program will not open this file on Unix
because they do not have drive letters in Unix.
So it's 99.9% for platform compatibility.
The reason it's not database compatible is because
when you work with databases you have to write
SQL statements once in a while
And unfortunately different database vendors have
variations in their SQL implementation.
Let's talk about outer joins - the simplest common
thing in DB-programming:
in Oracle you would say:
where t1.id = t2.id(+)
while in Sybae you would have to say
where t1.id* = t2.id
while in MSSQL you have additional syntax for that.
It's very conventient to use database build in functions
to manipulate with strings, dates etc.
They are very different between databases, alas !
So unless you stick to the simplest forms of select,
update, insert and delete you do not have the compatibility.
You can program in a smart way and create
some database classes, which will screen
your Java app from these differences;
but again these database classes will be different for
each database if you want to use all bells and
whistles of a particular database SQL.