I'm trying to connect the database with Netbeans with the help of oracle 10g. I have downloaded odjbc7.jar file and added it in the ORACLE THIN driver in db services. Still, I'm getting this class not found exception. (I am using Apache netbeans).
enter code here
import java.sql.*;
public class jdbclass {
public static void main(String args[]) throws ClassNotFoundException, SQLException
{
String url="jdbc:oracle:thin:@localhost:1521:orcl";
String uname="sh";
String passwd="ara";
String query="select pizza_type from pizza";
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection(url,uname, passed);
Statement st=con.createStatement();
ResultSet rs=st.executeQuery(query);
String name=rs.getString("pizza_type");
rs.next();
System.out.print(name);
st.close();
con.close();
}
}