Welcome to the Ranch
I presume by Oracle you mean the database and you are using SQL.
Start with the command‑line type of program, which you can read about in the
Java Tutorials. You will need to go to the database’s website to download the appropriate driver.