我们有一个现有的基于java的重量级项目,需要一个交互式脚本解释器。经过大量的研究,我们最终得到了Jython,原因之一是客户的团队已经拥有大量的python专业知识,并且用一种他们已经熟悉的语言给他们一个api是比较容易的。
Alright, well at first this was fine, but there turned out to be a problem- there are deployment environments which are locked down for ordinary, (ie: non-admin) users. Such ordinary users have no permission to write anywhere on the local drives of their machines. Additionally, their $Home (on windows) is usually over a high-latency network (often 100ms+), and to top it off, the size of the writeable folder itself is usually below 10mb. Yes, that's megabytes. Given these restrictions, it looks like Jython may not fit the bill. We need to be able to run without access to a low-latency disk cache, even if that means a small speed penalty. After a search through Google and the forums, there doesn't appear to be a way in Jython to accomplish this. 有几个明显的解决办法:
因此,我的请求是--是否有人知道有一个java脚本解释器具有交互模式,并且不一定需要磁盘缓存?它不一定需要使用python语法,如果有其他方法(例如: javaLUA、Groovy等)来实现这一点,我会对它敞开心扉。
发布于 2009-12-10 09:18:12
你可以直接
python.cachedir.skip=true不过你得检查你的进口品.
http://wiki.python.org/jython/PackageScanning
http://ghattus.com/2009/09/no-wlst-cachedir-with-python-cachedir-skip.html
发布于 2009-12-09 18:59:28
Groovy使用缓存目录的方式与Jython不同。Groovy编译成实际的Java类文件(在内存中,而不是在磁盘上使用脚本时)。我对Jython的理解是,它缓存Java包和类似的东西。Groovy使用相同的包结构,不需要这样的缓存。
发布于 2009-12-09 19:02:00
我不知道缓存的要求,对不起。我甚至没有意识到解释性Java环境需要这样的东西。好吧,这对我来说很简单,因为1TB磁盘是本地的,我完全可以访问。
虽然我不能讨论缓存问题,但我建议尝试一下克洛尔。它是一种相对较小的语言,具有很好的Java互操作性,如果它比其他语言少使用这种神秘的缓存,我也不会感到惊讶。
最大的缺点是Clojure是Lisp派生语言,与Java、Python以及客户可能知道的任何其他语言都有很大的不同。除非他们中的一些人在侧面开发emacs扩展:)
https://stackoverflow.com/questions/1876008
复制相似问题