There is no brief solution in java afaik.
You may specify a directory, containing classes, or a jar-file, containing classes.
But not directories, containing jars, containing classes.
There are several ways to work around:
a) The big, fat mama-jar:
Unjar all the jars, and create a super jar, containing all those classes.
Not very elegant, I admit.
b) Move all jars to %JAVA_HOME%/jre/lib/ext where the jvm will look automatically for jars.
Unfortunately some people report it doesn't work for them, while it works for me.
Curious?
Not very elegant too.
c) Generate the classpath on the fly:
Well - you have to translate this to Windows-Scripting Language or to get the native gnu-utils for win32, but you got the idea?
ls *.jar is a brother of dir *.jar, and the 'tr'-command means: translate linefeed to Unix-Pathseparator : (Win:
.
It's not very elegant too, in my opinion.
Feel free to find a better one.