i tried 'java -cp' command line to reference jar files.but for some reasons it doesn't work.FYI,java version on my machine is java1.8.
Later i tried '-Djava-ext-dirs' option and it works. Is there any syntax error in the command?
i tried 'java -cp' command line to reference jar files.but for some reasons it doesn't work.FYI,java version on my machine is java1.8.
Later i tried '-Djava-ext-dirs' option and it works. Is there any syntax error in the command?
Edit: The statement You cannot use wildcards in the -cp
paths. is outdated. See @Heri's comment below.
You cannot use wildcards in the -cp
paths. You have to list all jars separated by ;
on Windows or by :
on Linux and macOS.
You can create a shell/command script to list the jars in your lib directory and populate the -cp
option for you.