How can I connect to a database through JDeveloper via an SQL file? I mean not by writting String url = "jdbc:oracle:thin:@localhost:1521:ORCL";
for example but putting the database file inside my project and connect to the file.
Oracle is not that portable to be embeddable into a JAR file... Zou could have Oracle XE distributed with your application, but that needs installation too... And it is HUGE.
I'd suggest using H2DB.
Using H2DB is as easy as including in Maven dependencz, and setting up the connection string properly... Downside is that as far as I know, SQL developer does not support H2DB.
I had success with using Apache Derby similarly, to the extent of some tutorial-level experiment in the past.