Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
393 views
in Technique[技术] by (71.8m points)

android - I'm getting a java.lang.classnotfoundexception: com.mysql.jdbc.Driver

How come I get this error? Check the picture: enter image description here

I used the same jar on normal java projects(not android ones) and it used to work. What's wrong?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You're getting a NoClassDefFoundError because your jar file is not available at runtime. In order for it to be available at runtime you'll have to check the checkboxes on your jar file in your java build path like so: enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...