java ClassNotFoundException for org.h2.Driver

前端 未结 13 2533
被撕碎了的回忆
被撕碎了的回忆 2021-01-01 10:40

I am trying to use H2 to connect to a database in Java (using Eclipse as the IDE). The sample does (below) throws a ClassNotFoundException. The thing is, I

13条回答
  •  醉话见心
    2021-01-01 11:25

    I use sbt. In build.sbt, I removed the "h2" dependency and included this instead: "com.h2.database" % "h2" % "1.4.200" And it worked!

提交回复
热议问题