I've been developing in eclipse for a long time, so I'm not used to other IDEs.
That's why it also serves as a review ...
I like Maven, but jdbc is not provided (?), So Download the jar from here and add it to the external jar. http://download.oracle.com/otn/utilities_drivers/jdbc/10205/ojdbc14.jar
Since instance generation is done during oracle installation, Check the connection string with ↓. The port is 1521.
Run from SQL command line
SELECT DBID,NAME,DB_UNIQUE_NAME,CURRENT_SCN,LOG_MODE FROM V$DATABASE
DBID NAME is the connection string.
Set this!
main
Class.forName("oracle.jdbc.driver.OracleDriver");
//Connect to Oracle8i
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE", "system", "password");
//Create statement
Statement stmt = conn.createStatement();
Recommended Posts