why i get this when i click on save button which i have created in my application " Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver " ?
thanks @Drave Tolls and @Jasper de Jong i have mentioned path of ojdbc14.jar in my batch file to run this code . when i tried to execute the code for only jdbc-odbc connection it runs perfectly but when i include it in my project it giving me this error. i am not getting what exactly wrong.
this is my batch file code :
set path=C:\jdk\bin;
set classpath=C:\apache-tomcat-9.0.0.M18\lib\ojdbc14.jar;
javac *.java
java DataBasehandler
pause
thanks @Dave Tolls, yes i changed name class DataBasehandler by MainFrame because my MainFrame contains main Method and when i complie using *.java it complies successfully without any error but same error occurs when i hit save Button button used in my project to insert record into database.
thanks @Dave Tolls, yes it's the correct ojdbc jar file, i have used it before for simple jdbc-odbc connection it works fine and yes am sure it is actully in that location.
Without your machine it's going to be hard to help, really.
The cause of that error is that it can't find the class.
That is almost always because the jar file was not on the classpath when the app was launched.
Occasionally it's because the class isn't in that jar file (sometimes classes are moved between packages in different versions).
That's it.
There's not much more that can be said.
Can you run the code by simply doing:
java -cp C:\apache-tomcat-9.0.0.M18\lib\ojdbc14.jar;. MainFrame
from the command line?
Thankyou @Dave Tolls, yea i did it as you said now it is giving me this error
"java.sql.SQLException: Io exception: Invalid number format for port number".