i want to call the java class in batch file. how can i call. can tell me any commands which call the class file
Thanks Krishna
@ECHO OFF
java -jar "Path/To/The/Jar/Whatever.jar"
I would recommend first jaring up your class(es) and providing a link to the jar.
if you are having a class Myclass with package name com.mycomp.util then you have to go to the parent dir of "com" for example "c:\src" is the folder that contains com package then
your command should be in the batch file
cd c:\src java -cp jar1;jar2; com.mycomp.util.Myclass
now call the batch file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With