ClassNotFountException in a .jar file
843798Mar 14 2002 — edited Mar 28 2002Hi,
I'm writing a program that needs a connection with an oracle data base. Therefore I use an oracle thin driver. When I'm running the application in my developers environment, everything is running just fine, no connection problems. Therefore I' ve set my ClassPath wright. Because my application needs to be stand allone, I' ve made a .jar file of the hole program. This is where the problems began. When I try to make the connection to do my thing, I get the error message: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
Does anybody knows what to do. I'll be you incredible thankfull because time is running short for me.
my e-mail is: yves.wyffels@kh.khbo.be
here's the piece of my code that I use
import java.*;
import java.util.*;
import javax.swing.*;
import java.awt.*;
import java.sql.*;
import javax.swing.event.*;
import java.io.*;
import java.util.StringTokenizer;
import java.awt.event.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Gegevens2 extends ArrayList{
String gatenpatroonNaam="";
public void zoek(Visualisatie parent){
String dbUrl ="jdbc:oracle:thin:@30.6.5.9:1521:DEVL";
String gebruiker = "STAGE";
String paswoord="STAGE";
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection c = DriverManager.getConnection(dbUrl,gebruiker,paswoord);
.
.
.
.
.
}//try
catch (SQLException e){
JOptionPane.showMessageDialog(null,"verbindingsproblemen met de database "+e,"error",0);
System.out.println(e);
}
catch (ClassNotFoundException f){
JOptionPane.showMessageDialog(null,"verbindingsproblemen met de database "+f,"error",0);
}
yves