• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Runtime Eror

 
Geetha Sarath
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
Iam new to java,trying to connect with sqlserver7.0
my program is compling fine,while execution,Iam
getting the following error

Exception in thread "main" java.lang.NoClassDefFoundError: test

how to solve this problems,help me guys.
Thanks.
 
Dave Salter
Ranch Hand
Posts: 293
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you probably don't have the SQL Server JDBC driver on your class path.

If this is the case, check out the jTDS drivers.
 
David Ulicny
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are missing the class test on your classpath, start the program with
-cp switch

java -cpFullPathToClass test
 
Dave Salter
Ranch Hand
Posts: 293
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David,

I think yu're right. I missed that the original post said the class "test" could not be found.

Sorry for any confusion.

Dave.
 
David Ulicny
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave, I think that your answer will be for Geetha Sarath also very usefull. Classpath problems are very common here on Javaranch.
 
Geetha Sarath
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for ur suggestion,i wl try and get u back guys.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Geetha, JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.

I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.

Please read this for more information.

thanks,
bear
Forum Bartender
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic