Results 1 to 6 of 6
  1. #1
    alskdwq is offline Member
    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0

    Default JDBC Driver problem

    Hey guys, I've been working on a program which needs to connect to a SQL Server 2008 database, and I have downloaded sqlserver's jdbc driver, sqljdbc.jar and sqljdbc4.jar, and added them into my project. But when I run my program, the ClassNotFoundException is still not solved, and I have added the jars into the system classpath, how should I solve this problem?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: JDBC Driver problem

    Make sure that you compile with the jar files in the compilation classpath and then run it with them in the run classpath. Don't use the system's classpath for anything.

  3. #3
    alskdwq is offline Member
    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0

    Default Re: JDBC Driver problem

    Quote Originally Posted by Fubarable View Post
    Make sure that you compile with the jar files in the compilation classpath and then run it with them in the run classpath. Don't use the system's classpath for anything.
    Are the compilation classpath and the run classpath same with the build path? I'm new to Java... I already have them inside the build path

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  5. #5
    alskdwq is offline Member
    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0

    Default Re: JDBC Driver problem

    Quote Originally Posted by Fubarable View Post
    What is the "build path"? Are you speaking in Java or in IDE lingo?
    In the IDE, I'm using Eclipse Juno

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,097
    Rep Power
    20

    Default Re: JDBC Driver problem

    Are you running this through Eclipse or from elsewhere?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 5
    Last Post: 09-25-2012, 05:36 PM
  2. Replies: 0
    Last Post: 03-03-2012, 01:01 AM
  3. JDBC Problem - com.mysql.jdbc.Driver
    By icu222much in forum Advanced Java
    Replies: 5
    Last Post: 11-22-2011, 04:54 PM
  4. JDBC Driver problem
    By Swamipsn in forum New To Java
    Replies: 3
    Last Post: 08-09-2007, 03:55 PM
  5. JDBC driver connection problem
    By creativehacker in forum JDBC
    Replies: 3
    Last Post: 07-10-2007, 09:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •