How do I make the juicompressor jar file single or globally available?
I would like to put the yuicompressor file in one folder so that I can call
java -jar yuicompressor-2.4.2.jar ...
from anywhere on my system, with cygwin. For the bash files I use, I just put them in a shared folder and added the path to my PATH environment variable for Windows users, and the bash commands were found in cygwin.
when echo $PATH
I see the folder where I put the jyicompressor jar in the $ PATH list ..
But when I try java -jar yuicompressor-x.y.z.jar myfile.js -o myfile-min.js
(for example) I get the following error message:
Unable to access jarfile yuicompressor-2.4.2.jar
Even when I try to provide the absolute path to the jarfile, I get the same error.
How can i do this?
a source to share
An environment variable PATH
is a list of directories that the shell will execute when it tries to execute a command.
java.exe
will not look for directories in the environment variable PATH
to try to find the archive you are trying to start. Thus, launching java -jar yuicompressor-2.4.2.jar
from any directory other than the file containing the archive is expected to fail.
What is the complete command you are trying to do when providing an absolute path?
a source to share