The repo provides a detail procedure to connect Oracle XE 11g with Java.
-
Download NetBeans 8.2 with JDK
-
Download Oracle XE 11g R2
-
While installing Oracle, the installation wizard requests for a password. Remember or take a note of this password.
-
I will refer this password as oracle-password
-
-
Download the ojdbc-full.tar.gz zip folder
- Extract the zip file and remember the location
- We will be using the ojbc6.jar file
D:\Oracle files\OJDBC-Full\ojdbc6.jar
I will refer this path as jarfile_location
- Extract the zip file and remember the location
-
Open your Java project in NetBeans IDE
- If possible, create a package and then create your Java classes in that package (Optional)
-
Adding Oracle Library
-
Open the Run SQL Command Line APP
- Give connect system/oracle-password command
Congratulations, your setup is ready for connecting your Java Application with the Oracle Database. Enjoy developing your application.
Cheers!