I'm trying to write a simple Applet which must get text data from database.
I have some problems:
- I have remote mysql db or i can create a local db, what would be the most correct?
I have downloaded mysql-connector-java-5.1.22-bin.jar and put it to my applet source directory
yakoot@yakoot-home:~/java$ echo $CLASSPATH /home/yakoot/java/mysql-connector-java-5.1.22-bin.jar
but when I try,
Class.forName("com.mysql.jdbc.Driver");
I see
error: unreported exception ClassNotFoundException; must be caught or declared to be thrown
Class.forName("com.mysql.jdbc.Driver");
I tried some different locations for mysql-connector-java-5.1.22-bin.jar, but it did not help
try...catchblock and catch/handle theClassNotFoundExceptionin case it's thrown.