Java – How to add external jars in batch file in Java

batch-filejarjava

I have a java batch file consisting of 4 execution steps written for analyzing any Java application. In one of the steps, I'm adding few libs in classpath that are needed for my core application to run. If any of Java applications that I'm analyzing need specific jars, then how do I add them in the classpath mentioned in the batch file. Can this be done using JavaScripts ?

Best Solution

Just add them up front. The JVM loads them lazy-ly anyway. Also have a look here on the options how. (Also the comments)