Running two versions of java at same time [closed]

青春壹個敷衍的年華 提交于 2019-12-02 08:14:11

You'll need to use batch script (Windows) or a shell script (Linux) to execute artifactory, and set JAVA_HOME to the path of the Java version you want to execute

This better be on linux or else good luck.

Install java6 in /usr/java/java6/ and install java7 in /usr/java/java7/

Put something like this in your .bashrc:

export JAVA_HOME=/usr/java/java6/
export PATH='$JAVA_HOME/bin:$PATH

alias java6='export JAVA_HOME="/usr/java/java6/"; export PATH="$JAVA_HOME/bin:$PATH"
alias java7='export JAVA_HOME="/usr/java/java7/"; export PATH="$JAVA_HOME/bin:$PATH"

Then open a terminal run java7 then start up artifactory for everything else you will be fine with 1.6.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!