I have hundred's jars files in particular folder, 1. a.jar 2. b.jar 3. c.jar 4. d.jar ...etc I need to run a java application with these jars in class path, except particular one in command prompt. That is
$ java -cp c:\jarfolder*(except c.jar) Mainclass
I cannot remove that jar alone from that folder, because it causes some other problem. So please help me with exact solution.
You can write a simple batch file which loops over all the files in the folder and excludes the files which you don't want using it you can create the classpath string and run the java command in the final step.