Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "java: No match." mean?

When running java from the command line:

java -classpath bin:pellet-2.0.0/lib/* com.stuff.MyClass argumentTextStuff

I'm getting the following reply:

java: No match.

What's this mean? which java points to the expected file. And if I take the asterisk out, then I get the expected class not found error. Google searches aren't fruitful because I keep getting stuff about matching regexp patterns.

like image 481
JnBrymn Avatar asked Dec 17 '22 23:12

JnBrymn


2 Answers

Ah... already figured it out. It worked when I was using a bash shell, however the * is treated differently in the tcsh shell. So we switched to bash and it works. The reason is described here (per polygenelubricants's suggestion in the comments below).

like image 185
JnBrymn Avatar answered Dec 19 '22 12:12

JnBrymn


That is a bash (or whatever shell are you using) error message not a java one.

It means that "bin:pellet-2.0.0/lib/*" doesn't match any file.

Do not use wildcards in classpath.

like image 36
andcoz Avatar answered Dec 19 '22 13:12

andcoz