Question

I'm trying to run this command in the cmd:

java -jar yuicompressor-2.4.2.jar "C:\Users\Ehud\Desktop\test\dest\js\replacejs.js" -o       "C:\Users\Ehud\Desktop\test\dest\js.js" --charset utf-8 --verbose --preserve-semi

My OS is Win 7 64 bit, I have Java installed on my machine, and I'm running this command from the dir where the jar file is. the strange thing is that this worked fine in a different machine, I can't get why I recive this errors:

[Error] 34:20missing variable name

[Error] 34:20missing } after function body

[Error] 34:20missing } after function body

Since I haven't seen in the net anything with } for runnig this, can I asume that something is simply wrong with the jar file?

Thanks for your advice!

Was it helpful?

Solution

Those sound more like errors which yuicompressor has found in your .js file and it can't do its magic until the syntax errors are resolved.

For example: missing } after function body... even though everything is closed properly

Go through your .js file with a fine-tooth comb (or a JavaScript editor which flags syntax errors) and see if you can find the problem in there.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top