I want to run the java class file that uses a external jar file , How to compile it. below is my command ,that i have tried it.
javac set classpath="d:\vinod\text.jar" Generate.java
say javac -cp d:\vinod\text.jar" Generate.java or set the environment variable CLASSPATH to point to the text.jar file and say javac Generate.jar
to run the file you need to use the same arguments with the java program instead of javac.
Try:
set path = %path%;"d:\vinod\text.jar"
javac Generate.java // Or use -cp <path> command line argument
java Generate // if main method is present in Generate class.
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