So I'm trying to add a jar file to the environment variables in windows so instead of running java c:\mega_long_file_path\filename.jar
I can run filename
I tried adding ;c:\mega_long_file_path\filename.jar;
to the PATH variable in Control Panel >System and Security > System > advance system settings > advance > environment variables
and that didn't work , I'm positive I have done this before what am I missing?
Make a batch file named filename.bat
and put this line in it:
java -jar c:\mega_long_file_path\filename.jar
Then put this batch file into your PATH or update your PATH to point to the directory where you created it.
After that you should be able to run filename
.
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