Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

java

  • 01-04-2009 03:22PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2, Paid Member Posts: 2,032 ✭✭✭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, Registered Users 2 Posts: 3,945 ✭✭✭Anima


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


Advertisement