Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

java

Options
  • 01-04-2009 3:22pm
    #1
    Registered Users Posts: 86 ✭✭


    I am running Bprolog with sql in java, or at least trying to and I keep been thrown the following error. Anybody got any idea's? The following is the command I have been using, and the error which is returned.


    java -cp c:\bprolog sql




    Exception in thread "main" java.lang.NoClassDefFoundError: sql
    Caused by: java.lang.ClassNotFoundException: sql
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: sql. Program will exit.


Comments

  • Registered Users Posts: 1,998 ✭✭✭lynchie


    Java cant find the Class hence the ClassNotFoundException. Ensure that sql.class is in the classpath and remember that class names are case sensitive.


  • Registered Users Posts: 3,945 ✭✭✭Anima


    Make sure you have "." in the classpath enviroment variable. That means to include the current directory.


Advertisement