http://www.h2database.com/html/download.html I don't see it on this website. Is there anything I missed?
5 Answers
Dump this in your classpath: http://www.h2database.com/automated/h2-latest.jar
And then call
Class.forName("org.h2.Driver");
That should do it.
- 797
- 3,115
- 1
- 20
- 19
Go to the downloads page of the H2 website as you did. Download the INSTALLATION file for H2 and install it. Then, go to the folder where you installed it. The path to that folder (on a windows pc) should be C:\Program Files (x86)\H2\bin There will be a jar file there which looks like h2-some version number.jar. That is your driver. Bin means binary and that is usually the place where i look for any jar file.
- 181
Any downloaded .jar file in the Jar File section on Downloads page is the JDBC driver itself, e.g.: h2-1.4.188.jar
- 181
I'm saddened that people still recommended (even 6 years ago) direct jar usage, instead of promoting maven/gradle/whatever build automation tool. From the downloads page maven section you can get maven URL for direct download, and translate it to your build tool's format. Below is its maven interpretation:
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.200</version>
</dependency>
- 151
As @ThachVan explained, the H2 jar file is the JDBC driver itself. Get it from https://mvnrepository.com/artifact/com.h2database/h2
- 111