我正在使用带有ruby的java bridge(对于Stanford-Core-NLP),并且看起来jrb在Windows机器上的Ruby为32位(193)和Java为64位时无法工作。
可能吗?是否有任何解决方案,比安装Ruby 64更好(不受许多宝石支持)?我必须使用Java 64来支持4giga Java应用程序。
感谢 这是错误消息:
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/jar_loader.rb:45:in `load': can't create Java VM (RuntimeError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/jar_loader.rb:45:in `init_rjb'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/jar_loader.rb:38:in `load_jar_rjb'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/jar_loader.rb:27:in `load'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/binding.rb:63:in `load_jar'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/binding.rb:71:in `block in load_default_jars'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/binding.rb:68:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/binding.rb:68:in `load_default_jars'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/binding.rb:55:in `bind'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/stanford-core-nlp-0.5.1/lib/Stanford-Core-NLP.rb:125:in `bind'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/stanford-core-nlp-0.5.1/lib/Stanford-Core-NLP.rb:140:in `load'
答案 0 :(得分:1)
我很确定答案是否定的。
原因是(一般来说)你不能在同一个执行程序中混合32位和64位代码。非特权(即“用户模式”)程序无法在不同的寻址模式之间切换CPU。
其他论坛上的Ruby + Java + RJB的各种其他“求助”似乎支持这个......