简体   繁体   English

Java 1.5上的JSR223实现是否存在限制

[英]Are there limitations to JSR223 implementation on Java 1.5

The Java API for scripting languages (JSR223) comes as standard in Java 1.6 and can be downloaded separately for Java 1.5 here . 用于脚本语言的Java API(JSR223)是Java 1.6中的标准,可以在此处单独下载Java 1.5。

My question is: are there any limitations or differences I should be aware of if using the separate download with 1.5 versus the native support in 1.6? 我的问题是:如果使用1.5的单独下载与1.6中的本机支持,我是否应该注意任何限制或差异?

I had been facing the same question earlier. 我之前遇到过同样的问题。

One difference might be the quality of script engines. 一个区别可能是脚本引擎的质量。 Here's a response I got on jruby-user list: 这是我在jruby-user列表中得到的回复:

I guess one of the reasons would be that current JRuby engine works on Java5 is not an official release. 我猜其中一个原因是当前的JRuby引擎在Java5上工作并不是正式版本。 I put the archive for users' convenience. 为了方便用户,我放了存档。 http://old.nabble.com/Call-for-discussion-about-embed-API-tp24528478p24981076.html : http://old.nabble.com/Call-for-discussion-about-embed-API-tp24528478p24981076.html

Also: 也:

I also know some class version problems were reported for Java5+JSR223+Jruby, but it works fine for me. 我也知道Java5 + JSR223 + Jruby报告了一些类版本问题,但它对我来说很好。 http://old.nabble.com/Call-for-discussion-about-embed-API-tp24528478p25181920.html http://old.nabble.com/Call-for-discussion-about-embed-API-tp24528478p25181920.html

I think these relate to ScriptEngines actually compiled under JDK5, see http://kenai.com/projects/jruby/pages/JavaIntegration#Java_6_(using_JSR_223:_Scripting ) 我认为这些与在JDK5下实际编译的ScriptEngines有关,请参阅http://kenai.com/projects/jruby/pages/JavaIntegration#Java_6_(using_JSR_223:_Scripting

That said, I haven't really run into these or other real problems on Java5 and JRuby - apart from the limitations of java.scripting API itself, but that's the same on Java6 I guess. 也就是说,我没有真正遇到过Java5和JRuby上的这些或其他真正的问题 - 除了java.scripting API本身的限制,但我认为这与Java6相同。 (See that thread above as well). (见上面的那个帖子)。

So I think the benefit of Java6 -strictly from JSR223 point of view- would be better support and performance. 所以我认为Java6的好处 - 从JSR223的角度来看 - 将是更好的支持和性能。

On the other hand, I did run into class loading problems with Java 6 with OSGI: I think it needs extra tweaks so that the JRE's built in discovery mechanism finds the ScriptEngines living in bundles.. (I might post another SO question about this :) 另一方面,我确实遇到了带有OSGI的Java 6的类加载问题:我认为它需要额外的调整,以便JRE的内置发现机制发现ScriptEngines生活在bundle中。(我可能会发布另一个关于这个的SO问题: )

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

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