java ClassNotFoundException for org.h2.Driver

前端 未结 13 2390
被撕碎了的回忆
被撕碎了的回忆 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:22

    I am working with intelliJ. I had the "h2-1.4.200" in the lib folder. I tried every suggestion, ranging from , to . Strangely, my problem got solved only by going to these places : Project Structure -> Artifact -> Output Layout -> Available Elements and then expanding the content of the folder and then right click on "h2-1.4.200" and finally select "Extract Into Output Root". :) The strange solution

提交回复
热议问题