简体   繁体   中英

YUICompressor + Java

Can you run the YUICompressor from within a Java application?

I am new to Java programming so the answer may be obvious but it has alluded me.

Include the jar in your application and then look at the main function in ./com/yahoo/platform/yui/compressor/YUICompressor.java in the src directory of the zip file you download.

You can follow that to figure out the semantics of using the JavaScriptCompressor class within your own code.

It looks very straight forward.

It's written in java (+ rhino); It has api; Its tarball probably contains that api.

Look at it, add the jar into your project, employ it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM