简体   繁体   English

YUICompressor + Java

[英]YUICompressor + Java

Can you run the YUICompressor from within a Java application? 您可以从Java应用程序中运行YUICompressor吗?

I am new to Java programming so the answer may be obvious but it has alluded me. 我是Java编程的新手,所以答案可能很明显,但这却暗示了我。

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. 在您的应用程序中包含jar,然后在下载的zip文件的src目录中的./com/yahoo/platform/yui/compressor/YUICompressor.java中查看主要功能。

You can follow that to figure out the semantics of using the JavaScriptCompressor class within your own code. 您可以按照此方法找出在自己的代码中使用JavaScriptCompressor类的语义。

It looks very straight forward. 它看起来非常简单。

It's written in java (+ rhino); 它是用java(+ rhino)编写的; It has api; 它具有api; Its tarball probably contains that api. 它的压缩包可能包含该api。

Look at it, add the jar into your project, employ it. 查看它,将jar添加到您的项目中,使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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