I'm trying to start java class from commad line (Java 7.0, Windows XP). Class is packaged to jar and deployed to execution environment with other jars needed for execution. Not to be verbouse (and not to hardcode list of jars that could be chaged rarely) I'm trying to user wildcard. Next code is not working for me
java -cp ../classes/* some.package.Main
it says "Could not find or load main class" from very first jar of that directory. Java doesn't look for my class in other jars.
It should according to Understanding the class path and package names, isn't it?
All works fine if I set jar file explicitly
java -cp ../classes/playground.jar some.package.Main
But this doesn't fit for me because in other jars I also have main classes and I would like to have only one start script with configured classpath and environment variables etc. and only put class name as an argument to start.
What is wrong with first command line?
Resolved: escape wildcard processing in java classpath
Thanks.