Some security settings on Omega prohibit us from connecting to the database (Oracle/MySQL on Omega) from a program that is run on a remote machine (say your PC). There are two solutions to this problem:
Copy the program to your home directory in Omega and run it over there. This is fine if your program is platform independent. Else it might become a necessity for you to run the program on your local machine instead. In such cases you will need the second solution.
Before running the program on your computer, connect to Omega server using ssh, with the options: ssh -L 1521:localhost:1521 <username>@omega.uta.edu
The <username> here is the your user id with which you connect to Omega server. But, with this approach, you must be sure to have the right connector drivers on your system. You must get the right jars for Oracle and MySQL.
Another approach would be to contact the OIT team and ask for VPN access. But not sure what the procedure for this is.
The above suggestions are only to make sure that you get through the connection to DBs on Omega properly.
A small code snippet for help regarding using jdbc itself for connecting to a database can be found here or at the other links present in Project Materials section of the course web page.