OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
RE: Jdbc: ClassNotFoundException

MattEbjeld-wen.com
Date: Tue Nov 02 2004 - 10:41:02 CST


I cannot get that to print a version number on either PC.
Java version 1.4.2

Thanks,
Matt

-----Original Message-----
From: Schroeder, Alexander [mailto:alexander.schroedersap.com]
Sent: Tuesday, November 02, 2004 12:38 AM
To: MattEbjeld-wen.com; maxdblists.mysql.com
Subject: RE: Jdbc: ClassNotFoundException

Could you try a

java -jar sapdbc.jar -V

on the driver. If that works and does print a version number, there must be
something wrong with your class path setting.

What version of Java are you running?

Regards
Alexander Schröder
SAP DB, SAP Labs Berlin

> -----Original Message-----
> From: MattEbjeld-wen.com [mailto:MattEbjeld-wen.com]
> Sent: Monday, November 01, 2004 10:39 PM
> To: maxdblists.mysql.com
> Subject: Jdbc: ClassNotFoundException
>
> I can run this fine on the PC that has the database installed
> on it. When I
> move the class file and the sapdbc.jar file to another pc, I get:
> java.lang.ClassNotFoundException: com.sap.dbtech.jdbc.DriverSapDB
>
> import java.sql.*;
> public class Hello {
> public static void main(String args[]) {
> try{
> Class.forName ("com.sap.dbtech.jdbc.DriverSapDB");
> }
> catch(ClassNotFoundException ee ){
> System.out.println("ERROR:");
> System.out.println(ee);
> }
> }
> }
> (I know this code should do nothing... it's just trying to
> get the driver
> loaded and even that is failing.)
> I have tried putting both files in c:\temp\java then specifying the
> classpath.
> Java -classpath c:\temp\java\sapdbc.jar;. Hello
> I have put the jar in the c:\j2sdk1.4.2\jre\lib\ext dir and
> specified it in
> the path as well.
>
>
>