After this example also mentioned solution.Ĭonnection con = DriverManager. This will throw ClassNotFoundException because sql driver jar is not in classpath. The loadClass method in class ClassLoader.ĬlassLoader.loadClass(, boolean)ĭifference between Class.forName() and ClassLoader.loadClass()īelow is example of connecting with database and retrieve data from sql table.
0 Comments
Leave a Reply. |