vortitell.blogg.se

H2 database
H2 database













h2 database
  1. H2 database how to#
  2. H2 database zip file#
  3. H2 database driver#

H2 database driver#

And then configure Java Build Path (in Eclipse) like this: Add H2 JDBC Driver from Maven dependency:In case your project uses Maven, just put the following dependency declaration in the pom.xml file: Add H2 JDBC Driver from local Jar file:If your Java project doesn’t use any build tool, you should copy the h2-version.jar file to the project’s directory. The h2-version.jar file contains H2 JDBC driver, so you just need to make this jar file available in the project’s classpath.

H2 database how to#

How to Add H2 JDBC Driver to a Java ProjectTo use H2 database in your Java project, a compatible JDBC driver is required at runtime. It doesn’t provide rich features as phpMyAdmin or MySQL Workbench.To stop the H2 Console app, press Ctrl + C in the command prompt or terminal window which launched it.Ĥ. You can use it to browse your database and execute SQL statements.

h2 database

Then you can use its web interface to run SQL statements: The H2 Console app is as simple as that. Then it will open the H2 login page in your browser, as shown below: Just click Connect and it will create a new database named test under your user home directory, and get connected in embedded mode. Java -jar h2-version.jarBefore running this command, be sure that you change the current directory to the bin directory of the extracted zip file. It’s a Java webapp with embedded server, so type the following command to start H2 Console: How to use H2 Console Web AppYou can use the H2 Console to access your H2 database or any SQL database via JDBC. You can see the distribution comes with source code, binary, docs, scripts… but in most cases, you need to use only the h2-version.jarfile in bin folder.ģ.

H2 database zip file#

Click the link All Platforms (zip, 9.5 MB) to download the zip file which can be used on any operating system.Extract the downloaded zip file to a directory. If you want to use H2 browser-based console app, its JDBC driver or H2 server, you need to download H2 binary distribution from its home page at. The main features of H2 are:- Very fast, open source, JDBC API compatible.- You can use H2 in different modes, depending on your need: in-memory, embedded or client/server.- H2 provides a browser-based console application which you can use to access SQL database.- Lightweight: about 2.5MB jar file size.With such features, H2 can be used for rapid prototype development, testing purpose or embedded in Java applications. What is H2 Database?H2 is pure Java SQL database, which means you can embed H2 directly in your Java applications without any database installation. Code example connect to H2 in Server mode.Code example connect to H2 in Embedded mode.

h2 database

Code example connect to H2 in In-Memory mode.How to add H2 JDBC driver to a Java project.In details, I’ll walk you through the following content: In this article of JDBC series, you will learn the fundamentals of H2 database with Java programming language.















H2 database