First, database independence is complex. Really, very hard; to achieve this without using ORM or another tool, you will have to trade another aspect of the design of your solution. Simplicity and maintainability will suffer, as well as efforts to implement the solution.
So, I would really, really convinced that this is a high priority requirement - the hypothetical question "what if we want to switch from Oracle to SQL Server", in my opinion, is not enough justification to bear the additional costs .. .
If you have to deliver this function, and ORM is the easiest way to do this. ORM structures are specifically designed with database independence in mind (and their complexity is at least partially due to this requirement). They do this by abstracting the database implementation to a higher level; Instead of thinking in SQL statements, you are advised to think about domain objects.
Having said all this ...
I put the solution (not in Java, but the principle is worth it), which allowed to ensure the independence of the database. We saved our SQL statements as resources and loaded them through resource files. By default, ANSI SQL was used, which should work with any modern SQL-compatible database.
We had resource files for each database we supported, which we supported (in our case, MySQL and Oracle), and used overrides to load into the SQL specification of the database, if they existed.
This works like internationalization in most languages - first find the lines depending on the language, return to the default if you cannot find it.
The Java Resource Pack will make this pretty simple. The lack of hard coding of your SQL in your application has other advantages: fixing the database problem without changing the application code is much simpler, you can deploy the fixes as "resource" updates, and not send new binary files, etc.