Im getting started with Eclipse IoT and when trying to create the SQL connector I get the errors bellow. I have added the classpath in windows and the corresponding .jar library is added to the project as advised in https://stackoverflow.com/questions/8745872/classnotfoundexception-com-mysql-jdbc-drive. I cannot get why Im still getting this error. Any ideas?
The code that generates the error:
public static void getConnection(){
try{
Class.forName("com.mysql.jdbc.Driver");
}
catch (ClassNotFoundException e){
System.out.print(" Class.forName cannot be found");
e.printStackTrace();
}
And I get this:
Class.forName cannot be foundjava.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at controller.establishConnection.getConnection(establishConnection.java:17)