Home>

I want to display the H2 console screen by clicking h2.bat in P182 of Servlet/JSP (new edition) from the basics.

Error message

I bought a servlet/JSP (new version) from the basics and am studying by myself, but even if I click h2.bat on P182, the command prompt screen appears and disappears immediately. The H2 console screen is not displayed.

How can I resolve this?

I can only imagine how to set environment variables.

Tried

When I installed a new H2 database, the H2 console was displayed, but I hope it can be executed as described in this book.

If i know anyone, please professor.

Additional information

There is a folder called C: \ work.

work… Folder containing Tomcat, H2, and sample program

There are the following folders and files under

work.

h2 ... H2 Database Engine
sample ... Sample program for this book
tomcat ... Tomcat
h2.bat ... Batch file for starting H2
start.bat ... Batch file to set environment variable and start command prompt
tomcat.bat ... Batch file for starting Tomcat

The contents of the h2.bat batch file are as follows.

set JAVA_HOME = C: \ Program Files (x86) \ Java \ jdk1.8.0_121
set PATH =% JAVA_HOME% \ bin;% PATH%
cd% ~ dp0h2 \ bin
h2w

If i click this h2.bat, the H2 console screen will be displayed on the web, but it will not be displayed in your own case.

I want to solve this problem.