对于Java的RVM般'的工具 [英] 'RVM-like' tool for Java

查看:352
本文介绍了对于Java的RVM般'的工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找一个工具,它可以让我切换正在运行的Java实现,像Ruby的RVM(或RBENV)。据我所知,Debian的系统提供了替代机制,我可以手动设置JAVA_HOME。

I am looking for a tool that would let me switch the running Java implementation, like Ruby's RVM (or RBENV). I am aware that Debian systems provide the alternatives mechanism, and that I can set JAVA_HOME manually.

不过,我想的东西如果可能的话更加自动化。如果能取的JDK,这将是更好的,但不是必需的。

However, I'd like something more automated if possible. If it could fetch JDKs that would be even better, but not necessary.

我已经搜查,但没有看到这样的事情。我的猜测Java生态系统已经习惯了在IDE中有此功能。

I've searched but didn't see anything like it. My guess the Java ecosystem got used to having this functionality in an IDE.

编辑:更改PATH和JAVA_HOME似乎很好地工作。它可以自动平凡

Changing PATH and JAVA_HOME seems to work fine. It could be trivially automated.

推荐答案

我觉得没有这样的工具。每个平台都有自己的点击系统。于Debian / Ubuntu,RedHat的/ CentOS的和SLE / OpenSUSE系统(可能是一些其他的发行版也一样)使用的替代的机制。 Mac OSX上有自己的buildin切换机构来更改当前使用的JVM。

I think there is no such tool. Every platform has hits own system. Debian/Ubuntu, RedHat/CentOS and SLE/OpenSUSE ( probably some other distributions as well) use the alternative mechanism. Mac OSX has its own buildin switching mechanism to change the current used JVM.

我要保持很多开发商的工作站和服务器。所有的* nix基于(OSX,Linux和Solaris)以及用于安装所有JVM的目录,并创建符号链接电流应使用的版本。该JAVA_HOME和PATH变量指向该电流符号链接。如果IA想使用其他版本只HAF移动当前符号链接。没有进一步的行动是必要的。

I have to maintain a lot of developer workstations and servers. All *nix based (OSX, Linux, Solaris) and used to install all JVMs in a directory and create a symlink CURRENT to the Version that should be used. The JAVA_HOME and PATH variable pointing to this CURRENT symlink. If Ia want to use another version only haf to move the CURRENT symlink. No further actions are necessary.

不幸的是这种方法不适用于基于Windows的系统上运行。

Unfortunately this approach does not work for Windows based systems.

这篇关于对于Java的RVM般'的工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆