HINDIHow to connect oracle with java In Eclipse by tech valley
>> YOUR LINK HERE: ___ http://youtube.com/watch?v=zLFStoMNn60
This video will explain you how to connect the oracle database with java in eclipse • Download link for software and program • 1. Eclipse mars.2 • https://www.eclipse.org/downloads/ • 2. Oracle express 11g • accept the license and click on required link.. it requires sign in .. sign in to download • http://www.oracle.com/technetwork/dat... • • Program: • import java.sql.*; • class OracleCon{ • public static void main(String args[]){ • try{ • //step1 load the driver class • Class.forName( oracle.jdbc.driver.OracleDriver ); • • //step2 create the connection object • Connection con=DriverManager.getConnection( • jdbc:oracle:thin:@localhost:1521:xe , system , oracle ); • • //step3 create the statement object • Statement stmt=con.createStatement(); • • //step4 execute query • ResultSet rs=stmt.executeQuery( select * from emp ); • while(rs.next()) • System.out.println(rs.getInt(1)+ +rs.getString(2)+ +rs.getString(3)); • • //step5 close the connection object • con.close(); • • }catch(Exception e){ • System.out.println(e); • } • • } • }
#############################
![](http://youtor.org/essay_main.png)