开发者

RVM, JRuby setting specific java environment

  • Ubuntu 10.04LTS
  • Netbeans 6.9.1 (with embedded JRuby 1.5.1)
  • JDK6u17 (installed in 开发者_如何转开发/opt)
  • GlassFish Gem 1.0.2

I am using a old JDK because of this bug: http://jira.codehaus.org/browse/JRUBY-4785

I want to install RVM and install another instance of JRuby. But i cant find any information how to set JRuby Java environment to JDK6u17(directory /opt).

I would be grateful for the help.


JRuby on default use system Java. So if i change "system" Java, JRuby will use that one. I have figured two ways to set specific Java environment.

  1. Set JAVA_HOME. Here is a good one tutorial:

http://vietpad.sourceforge.net/javaonlinux.html

  1. Update java setting from terminal(works only for JVM installed from apt-get or aptitude).

sudo update-alternatives --config java


That JRuby bug is marked as fixed for JRuby 1.6RC1, so you no longer need to use the old JDK.

I am using RVM and JRuby 1.6RC1 on Ubuntu 10.04 LTS just fine. There are instructions on my website for working with this version of Ubuntu, RVM and JRuby.

You don't need all the instructions, but some of the commands might help, if you get stuck.

http://www.scottlowe.eu/deploying-rails-3-with-jruby-daemonized-glass

(It does tell you how to get a modern JDK installed)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜