org.h2.tools.XXXX NOT FOUND!

3,609 views
Skip to first unread message

sheing3003

unread,
Oct 24, 2013, 5:58:35 AM10/24/13
to h2-da...@googlegroups.com
Hello All,

  When I tried to do jave -cp h2*.jar org.h2.tools.Server  (or any others like Shell), windows command prompt returns cannot find org.h2.tools.XXXX. Please help. Thanks!

Peter

Ryan How

unread,
Oct 24, 2013, 8:03:24 AM10/24/13
to h2-da...@googlegroups.com
Can you type in the "dir" command and show the directory listing, then
the java -cp h2*.jar etc command and copy paste the output here?.
> --
> You received this message because you are subscribed to the Google
> Groups "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to h2-database...@googlegroups.com.
> To post to this group, send email to h2-da...@googlegroups.com.
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/groups/opt_out.


sheing3003

unread,
Oct 24, 2013, 12:17:08 PM10/24/13
to h2-da...@googlegroups.com
"Could not find the main class: org.h2.tools.Server" in C:\user\shiang\project\activiti-5.8\apps\h2\h2.start.bat
I originally was using activiti demo, but it didn't work
But even if I run the h2 directly with java using java h2*.jar -cp org.h2.tools.server it won't work

Ryan How

unread,
Oct 24, 2013, 6:53:25 PM10/24/13
to h2-da...@googlegroups.com
I you can paste the entire output and directory listing, I'm not sure
what you are doing. It seems like a basic java classpath issue. Nothing
H2 related.

Noel Grandin

unread,
Oct 25, 2013, 4:34:03 AM10/25/13
to h2-da...@googlegroups.com


On 2013-10-24 11:58, sheing3003 wrote:
>
> When I tried to do jave -cp h2*.jar org.h2.tools.Server

Read the documentation on the "-cp" parameter again.
You are not using it correctly.

Roy Xu

unread,
Feb 16, 2016, 3:46:44 AM2/16/16
to H2 Database
Hi Peter,

The wildcard '*' in "java -cp h2*.jar org.h2.tools.Server"  should be a "Filename Expansion" in Bash not a classpath wildcard. A classpath wildcard should be '*' not "*.jar" or "xx*.jar".
So you can execute "java -cp ./* org.h2.tools.Server" in Windows cmd:
> java -cp ./* org.h2.tools.Server
and execute "java -cp h2*.jar org.h2.tools.Server" with bash:
$ java -cp h2*.jar org.h2.tools.Server

Understanding class path wildcards

在 2013年10月24日星期四 UTC+8下午5:58:35,sheing3003写道:

H. Heinzelmann

unread,
May 10, 2017, 7:08:58 AM5/10/17
to H2 Database
Hi Roy Xu,

it seems I have the same problem, too. I get an error message in German that means the same.

I try to use the H2 tools with .bat or windows cmd.exe.
I also tried to use  java -cp ./* org.h2.tools.Shell but it ends in the same message.

I also tried to change the CLASSPATH in the system.

I didn't find any .class files of the tools, only the .java files.

Do I need to do anything else? I wasn't able to find any more information about that on the H2database webpage nor here in this group.
Reply all
Reply to author
Forward
0 new messages