This is my code
public class Main {
    public static void main(String[] args) {
        
        Connection myConnection;
        System.out.println("Sample db connectivity using MySQL and netbeans");
        
        
       try{
        
        Class.forName("com.mysql.jdbc.Driver");
        myConnection=DriverManager.getConnection(
                "jdbc:mysql://localhost:3306/sample"-"nbenavidez"-"password"
                );
        }
        catch(Exception e){
            System.out.println("Failed to get connection - This is BSSSSS");
            e.printStackTrace();
        }
        
        
        
    }
}
the error :
Failed to get connection - This is BSSSSS
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at dbsample.Main.main(Main.java:28)
I have the connector in place (the jar file) and it does compile fine also
which allows you to add and remove peoples details- such as their names- phone numbers- and addresses?
if you d rather you can send my an email- which is trevman75@yahoo.com
I need a good place where I can find source for compression algorithms in JAVA (for Huffman- LZV- Arithmetic- universal...)
I cannot view some things on web pages- most I can though. Have all current upgrades and flash player- java- shockwave players all working fine. Seems to be HTML error and have tried to change the editor- but didn t help. Happens with IE and Mozilla Foxfire.
 
No comments:
Post a Comment