Java Mozilla Rhino 教程
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9747314/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Tutorials for Mozilla Rhino
提问by Abhinav Kulshreshtha
Can any one suggest a good tutorial for Mozilla rhino. What i want to do is to validate a form in java swing with javascript.
The official tutorial page on the mozilla website is not clear about actual coding, it only shows its features in code fragments.
任何人都可以为 Mozilla rhino 推荐一个好的教程。我想要做的是使用 javascript 验证 java swing 中的表单。
mozilla 官网的教程页面并不清楚实际的编码,只是在代码片段中展示了它的特性。
There was also a page about scripting java inside javascript. Would it be better to use it instead of JSP for small applications, personally i didn't like java in web development compared to PHP.
还有一个关于在 javascript 中编写 java 脚本的页面。对于小型应用程序,使用它而不是 JSP 会更好吗,与 PHP 相比,我个人不喜欢 Web 开发中的 Java。
采纳答案by TryTryAgain
The best thing to do is play with the examples supplied.
最好的办法是使用提供的示例。
Also, I have found these to be helpful:
此外,我发现这些很有帮助:
If you are on windows this is how to setup your environmentand a simple intro (having you compile and run your first file).
This talks about how Rhino ECMAScript Engine is part of Java6and how to leverage Java and scripting with the Java Scripting API.
This video from Google IO 2008was very helpful
Rhino absolutely depends on one's inclination and interest in Java and JavaScript.
如果您在 Windows 上,这是如何设置您的环境和一个简单的介绍(让您编译并运行您的第一个文件)。
这讨论了Rhino ECMAScript Engine如何成为 Java6 的一部分,以及如何利用 Java 和 Java Scripting API 编写脚本。
Rhino 完全取决于个人对 Java 和 JavaScript 的倾向和兴趣。
回答by Txukytruky
not easy to find a good tutorial. You can check the Chapter 12 of the book "Javascript: The Definitive Guide 6th Edition", to get some very good insights. But, if you don't like java I think it's going to be a nightmare.
不容易找到好的教程。您可以查看“Javascript: The Definitive Guide 6th Edition”一书的第 12 章,以获得一些非常好的见解。但是,如果您不喜欢 Java,我认为这将是一场噩梦。