Yes, you are missing Java itself. Wherever it is installed on your system, you need the path where the java executable resides (java.exe) on your filesystem, typically something like this on Windows systems:
c:\Program Files\Java\jre1.6.0\bin
So something like this would work assuming the above is the location of your JRE...
c:\devpath>c:\Program Files\Java\jre1.6.0\bin\java YUICompressor.jar ...
You’ll have to consult YUICompressor folk for more assistance with how to use the jar.