Java 简单框架与 Coffeescript
有人有将 Java Simple Framework 与 Coffeescript 集成的经验吗?我迫切需要一个在运行时编译 Coffeescript 的示例。我正在考虑 wro4j,但不确定如何将其与 Java Simple Framework 集成。
Has anybody got experience in integrating Java Simple Framework with Coffeescript? I'm desperately in need of an example to compile Coffeescript in run-time. I'm thinking of wro4j but not sure how to integrate that with Java Simple Framework.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 rhino javascript 引擎,这是一个很好的简短教程:
http://metoojava.wordpress.com/2010/06/20/execute-javascript-from-java/
并包含此文件(coffeescript 到 javascript 编译器,用 javascript 编写):
http://coffeescript.org/extras/coffee-script.js
然后使用 CoffeeScript.compile( )编译然后运行您的代码。这能满足您的需求吗?
You could use the rhino javascript engine, here's a nice short tutorial:
http://metoojava.wordpress.com/2010/06/20/execute-javascript-from-java/
And include this file (the coffeescript to javascript compiler, written in javascript):
http://coffeescript.org/extras/coffee-script.js
Then use CoffeeScript.compile() to compile and then run your code. Would that work for your needs?