Link to home
Start Free TrialLog in
Avatar of Jasbir21
Jasbir21

asked on

Downloading/installing jdbc thin drivers on linux"

HELP................., how do install jdbc thin driver on linux server...


Jasbir
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jasbir21
Jasbir21

ASKER

The problem is that i have never installed it on Windows before.
  My boss , just told me that i don't need to install it.I just need to include the classpath of the classes12.zip


Jasbir
Do you know how to do it?

Thanks
easiest would just be to add the zip to your ext directory.
you may have to rename it to a jar.
Sorry objects , i am new to linux.How do i add the zip to ext directory

Jasbir
if jre is installed in say /usr/java:

cp classes12.zip /usr/java/lib/ext/classes12.jar
My jre is in j2sdk1.4.1_02


I am at the home/prod


cp classes12.zip /usr/java/j2sdk1.4.1_02/lib/ext/classes12.jar


Note: at user home prod , i have 2 files, classes12.zip and classes12.jar


when i typed that , the error i got is cp:cannot create regular file /file/usr/java/j2sdk1.4.1_02/lib/ext/classes12.jar


no such file and dir
then try:

cp classes12.jar /usr/java/j2sdk1.4.1_02/jre/lib/ext/


got the error cp:cannot create regular file '/usr/java/j2sdk1.4.1_02/jre/lib/ext/classes12.jar :Permission denied
Sorry , i forgot to mention , that i have classes12.zip and classes12.jar at the home prod
you'll need to get your sys admin to copy them then.

Another alternative is to just specify them on your command line:

java -classpath classes12.jar;$CLASSPATH MyClass

Or add it to the CLASSPATH environemtn variable.
i don't mind using the second method.

When i run the program , i get this error:


Invalid Oracle URL specified.

Maybe in linux i need to type the url in a different way ??

String url="jdbc:oracle:thin@klmsph1:1521:KLMPMIS";


When i am working on my workstation(pc), i used the same url and it works.
try{

Class.forName("oracle.jadbc.driver.OracleDriver");
String url="jdbc:oracle:thin@klmsph11:1521:KLMPMIS";
String user="com";
String pass="com";

Connection con=DriverManager.getConnection(url,user,pass);
looks ok, does the linux box know about the host 'klmsph1'?

try:

ping klmsph1
The screen ran full with

64 bytes .... .klmsph1.m........
64 bytes......

try asking oracle tech support.
Thanks a lot , it works.

 God bless you.
God bless you.Thank you
Objects, i tried loading to the intranet, the error is i need java plug in.

When i tried to open it on anoter comp, the error is java.lang.classnotfound.

HELP
Think i now why, the class file is not in that www/var..

Good to hear you are making progress.
Hope you are also learning :-)