Is there a DBMS which runs on Linux and everywhere else Java runs (Windows, UNIX and MacOS)?
There are some non-Java databases that run on many platforms, such as MySQL and PostgreSQL, but none is portable to as many platforms as something written in Java.
One important caution: no two databases are the same, and even the simplest database apps usually require some porting when you change the underlying DBMS. Some capabilities, such as large objects, are not supported on all DBMSes or require significant SQL code changes between different DBMSes. You'll need to study any candidate DBMS carefully to make sure you can migrate an existing app to it.