I started reading the book "Jakratta Servlet/JSP from the basics" and am studying.
I have introduced the Eclipse Java EE IDE for Web Developers at hand with the contents that I can learn while actually moving my hands, and I have been learning until today.

I haven't been particularly conscious of the environment settings for running Java (JDK) and Tomcat, but thanks to the introduction of Eclipse, I have been able to confirm the operation of the book publication until now.

From today, I entered the chapter on interaction with the database and immediately placed the H2 folder provided by the publisher on my computer.
A bat file for starting the H2 console (which works in the browser) is provided, so I tried starting it.
It seems that the Java environment settings are different from the assumptions in the reference book, and it does not work safely.

I checked the settings of the environment variables PATH and CLASSPATH, but I couldn't find them.
Is this related? If there is a relationship, what kind of settings should I make when installing Eclipse?

@java -cp "h2-1.4.194.jar;% H2DRIVERS%;% CLASSPATH%" org.h2.tools.Console% *
@if errorlevel 1 pause

I would be happy if I could continue working on the reference book, please help me.

20200911 1029AM image added

20200911 1244PM Image added

  • Answer # 1

    There is no direct relationship between installing Eclipse and H2 Database.

    H2 Database is downloaded separately http://www.h2database.com/html/main.html.

    There is a high possibility that the files extracted in the reference book are incorrect.
    You can open the console by starting h2.bat of h2db without setting environment variables or classpaths.

  • Answer # 2

    I placed the H2 folder on my computer.

    Isn't it installed?

    H2 Database Engine (H2DB) environment construction
    The file downloaded by the above procedure is the provided file (installer).

Related articles