본문 바로가기
[OS]/CentOs

자바 버전 정해주기

by 조조군 2016. 3. 29.
반응형

JAVA_HOME=/usr/local/java/jdk1.6.0_45

CATALINA_HOME=/usr/local/tomcat

PATH=$PATH:$CATALINA_HOME/bin

CLASSPATH=$CLASSPATH:$CATALINA_HOME/lib/mysql-connector-java-5.1.17-bin.jar

export JAVA_HOME CLASSPATH PATH

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mysql/lib






update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.6.0_45/bin/java" 1;

update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.6.0_45/bin/javac" 1;

update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk1.6.0_45/bin/javaws" 1;





update-alternatives --set java /usr/local/java/jdk1.6.0_45/bin/java;

update-alternatives --set javac /usr/local/java/jdk1.6.0_45/bin/javac;

update-alternatives --set javaws /usr/local/java/jdk1.6.0_45/bin/javaws;

반응형

댓글