Skip to main content

How to set classpath to access oracle driver for Different Versions Of Oracle Software

 How to set classpath to access oracle driver  for Different Versions Of Oracle Software 

For  More Details Watch Video:



Solution:
======
setting classpath to access oracle driver
=========================================
for different versions of Oracle
ojdbc14.jar    -----> oracle 10g
  ojdbc6.jar     -----> oracle 11g
   ojdbc7.jar     -----> oracle 12c
   ojdbc8.jar     -----> oracle 19c
Step1::Go to The folder where you extract your Oracle Downloaded Zip File.
            For Ex::I have Extracted Zip file in "C drive" in "App" Folder.
       
Step 2:: When We go to that folder then search for jar files acc. to your Oracle version
          ojdbc14.jar    -----> oracle 10g
          ojdbc6.jar     -----> oracle 11g
          ojdbc7.jar     -----> oracle 12c
          ojdbc8.jar     -----> oracle 19c
For Ex::I have oracle 19c version so i will find for ojdbc8.jar simlarly you can find   ========================================================================
As You Seen When we find ojdbc8.jar then we will get different jar files

=>Right click On ojdbc.jar file and click on open file location
=>Once we gone to file location then copy the file location
==================================================================
For Ex::
So Here I Copied::C:\App\WINDOWS.X64_193000_db_home\jdbc\lib\ojdbc8.jar
=======================================================================
Next Step :: Right Click On This PC And click On properties
===========================================================
Next step :: Click On Advanced System Settings
==================================================
Next Step:: Click On environment Variable
================================================
Next Step :: In environment variable see at system variables
============================================================
Next Step :: there you can see classpath variable
======================================================
If you Do not Havr classpath variable then click on new 
     Then There at variable name :: classpath
      At the variable value      ::C:\App\WINDOWS.X64_193000_db_home\jdbc\lib\ojdbc8.jar;.
     at variable value path the copied path and dont forgot to write ";." at end
      Then click on "ok"
======================================================
Click on "Ok"  on The environment variable tab at bottom
Similarly click on "ok" on system propeties tab 
=======================================================
In this way setting classpath to access oracle driver
=======================================================
If you face any problem then write in comment I will try to replay


                    




 

Comments

Popular posts from this blog

Servlet Project Book Shop Application in eclipse

 Servlet Project Book Shop Application in eclipse  For explanation watch video::: Note :: In this Project you must configure web server (for example tomcat) with eclipse ide Download Bootstrap  from ::         https://getbootstrap.com/docs/4.3/getting-started/download/ Download mysql jar file from :: https://mvnrepository.com/artifact/mysql/mysql-connector-java/8.0.22 adding MySQL Connector/J jar file in eclipse ide for jdbc video :: video link : https://youtu.be/4Fyd-k3eG_I Directory Structure:: web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID" version="4.0">   <welcome-file-list>     <welcome-file>home.html</welcome-file>   </welcome-file-list>   <display-...

JDBC basic example For Select Query

JDBC basic example For Select Query  For explanation watch video:  For Creating Table:: SQL> create table emp60(srno int,fname varchar2(10)); Table created. SQL> desc emp60;  Name                                      Null?    Type  ----------------------------------------- -------- ----------------------------  SRNO                                               NUMBER(38)  FNAME                                              VARCHAR2(10) SQL> insert into emp60 values(1,'allu'); 1 row created. SQL> insert into emp60 values(2,'vijay'); 1 row created. SQL> insert into emp60 values(3,'rajni'); 1 row created. SQL...

JDBC Program to access table data from mysql database

 import java.sql.*; class MysqlCon  { public static void main(String[] args)  { try{ Connection con = DriverManager.getConnection("jdbc:mysql:///new","root","root"); Statement st = con.createStatement(); String query = "select * from login"; ResultSet rs = st.executeQuery(query); while(rs.next()){ System.out.println(rs.getString(1)+" "+rs.getString(2)); } con.close(); }catch(SQLException e){ System.out.println("Error"); }catch(Exception e){ } } }