java - Open Jar through batch file through PATH -
i made batch file executes commands through jar:
@java -jar commands.jar %* this file tree:
c:\ commands\ commands.bat commands.jar i have path variable set "c:\commands\" can access commands anywhere on pc. can run batch file, reason won't open jar. when type
commands
or
commands help
it says
error: unable access jarfile commands.jar
i have tried using quotes around jar name, have tried moving jar... nothing works...
%~dp0 gives bat file path so
@java -jar %~dp0commands.jar %* see call /? (even though aren't using call).
by using ftype, assoc, , editing setx variable pathext add jar files can type jar's name , have run without batch file needed.
Comments
Post a Comment