hi
i'm very new to java (just curious)
i'm following this tutorial on databases and at certain point i've to use the driver
i went to mysql download this:
mysql-connector-java-3.0.9-stable wherein is the .jar file.
i googled a lot in forums and also read the readme and the sun One Studio 4 update 1 (the version i'm using). Cant find a hint on how to solve it, because when i try to compile i get this error:
"TesteJDBC.java [25:1] unreported exception java.lang.ClassNotFoundException; must be caught or declared to be thrown
Class.forName("com.mysql.jdbc.Driver"
.newInstance();
^
TesteJDBC.java [25:1] unreported exception java.lang.InstantiationException; must be caught or declared to be thrown
Class.forName("com.mysql.jdbc.Driver"
.newInstance();
^
2 errors
Errors compiling TesteJDBC."
here's the relevant code:
try {
/*... */
Class.forName("com.mysql.jdbc.Driver"
.newInstance();
/*... */
}
i'm using winxp pro, jsdk1.4.1_02 and all the windows updates...
I tried to mount filesystem and also tried the tutorial on java where i define the classpath, in dos... but that didnt work too.
Can someone help me please?
remember i'm very new to this...
thanks in advance
i'm very new to java (just curious)
i'm following this tutorial on databases and at certain point i've to use the driver
i went to mysql download this:
mysql-connector-java-3.0.9-stable wherein is the .jar file.
i googled a lot in forums and also read the readme and the sun One Studio 4 update 1 (the version i'm using). Cant find a hint on how to solve it, because when i try to compile i get this error:
"TesteJDBC.java [25:1] unreported exception java.lang.ClassNotFoundException; must be caught or declared to be thrown
Class.forName("com.mysql.jdbc.Driver"
^
TesteJDBC.java [25:1] unreported exception java.lang.InstantiationException; must be caught or declared to be thrown
Class.forName("com.mysql.jdbc.Driver"
^
2 errors
Errors compiling TesteJDBC."
here's the relevant code:
try {
/*... */
Class.forName("com.mysql.jdbc.Driver"
/*... */
}
i'm using winxp pro, jsdk1.4.1_02 and all the windows updates...
I tried to mount filesystem and also tried the tutorial on java where i define the classpath, in dos... but that didnt work too.
Can someone help me please?
remember i'm very new to this...
thanks in advance