Relative to what? PHP and Java have many differences and some similarities. It's not like you could copy and code from PHP to Java (maybe some SQL statements).
I don't understand this question. A DB is a DB. If you can connect to it, you can operate on it.
Java is platform independent. It runs on a Virtual Machine (VM), as corbin mentioned, it can run on windows, solaris, linux and mac os.
If the user does not have a internet connection then they won't be able to access the DB. If they download information to their local machines, previous to the internet going down, then yeah they can use that data with the java program.