| Author |
JDBC Connectivity to Oracle 11g on Windows 7
|
Faheem Ahmed Shaik
Greenhorn
Joined: Aug 11, 2010
Posts: 2
|
|
Hi All,
This is Faheem.I am a little new to Java. I have installed Oracle 11g on Windows 7 (64 bit) and am trying to execute a simple JDBC prg. but i get an error saying
package oracle.sql does not exist
package oracle.jdbc.driver does not exist
Oracle 11g is installed in c: Drive.
I have pointed my Path and CLASSPATH as following
CLASSPATH
C:\Program Files (x86)\Java\jdk1.6.0_12\;C:\app\Shaik\product\11.1.0\db_1\oui\jlib\;C:\app\Shaik\product\11.1.0\db_1\owb\wf\lib\;C:\app\Shaik\product\11.1.0\db_1\jdbc\lib\;
Path
C:\app\Shaik\product\11.1.0\db_1\bin;C:\Program Files (x86)\PC Connectivity Solution\;%CommonProgramFiles%\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\x64\;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter\Driver;C:\Program Files (x86)\Java\jdk1.6.0_12\lib;C:\Program Files (x86)\Java\jdk1.6.0_12\bin;C:\app\Shaik\product\11.1.0\db_1\jdbc\lib\;C:\app\Shaik\product\11.1.0\db_1\BIN;
The following jar files are in the location C:\app\Shaik\product\11.1.0\db_1\jdbc\lib (I have added this location in the Path and CLASSPATH variables)
ojdbc5
ojdbc6
ojdbc5_g
ojdbc6_g
ojdbc6dms_g
orai18n
Any help is truly appreciated.
Thanks in advance.
Shaik Faheem
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2343
|
|
Put the .jars themselves in the classpath, not their directory. And only the jars that you require.
Example:
CLASSPATH=C:\app\Shaik\product\11.1.0\db_1\jdbc\lib\ojdbc5.jar;c:\....
And there is no need at all to add location to the jars to the PATH.
|
OCUP UML fundamental
ITIL foundation
|
 |
Faheem Ahmed Shaik
Greenhorn
Joined: Aug 11, 2010
Posts: 2
|
|
Hi Jan,
Thank you for the reply. pointed classpath to the folder where OJDBC14.jar was present and it is working now.
|
 |
nikita shimpi
Greenhorn
Joined: Jul 04, 2011
Posts: 1
|
|
|
I am using eclipse as IDE and trying oracle connectivity with java on windows 7..I did as per your suggestion through older post by pointing classpath where ojdbc14.jar is..still i am getting an exception like "Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver"..please help me out as early as possible..please..thanks in advance...
|
 |
aman nagi
Greenhorn
Joined: Jun 15, 2010
Posts: 5
|
|
what is the version of oracle you are trying to connect through ojdbc14.jar
please post the complete exception.
|
 |
 |
|
|
subject: JDBC Connectivity to Oracle 11g on Windows 7
|
|
|