#! /bin/bash
# 获取进程ID
id=`ps -ef | grep name | grep -v $0 | grep -v grep | awt '{print $2}'`
#配置java环境变量
echo 'export JAVA_HOME=/java/home_path' >> /etc/profile
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> /etc/profile
echo 'export CLASSPATH=.:$JAVA_HOME/lib/rt.jar:$JAVA_HOME/lib/tools.jar' >> /etc/profile
网友评论