java基础21天学习

第一天

java基础21天学习

 

 java基础21天学习

 

 

 下载openjdk发行版地址:dragonwell-jdk.io

配置环境变量
JAVA_HOME=/opt/jak
PATH=SPATH:$JAVA_HOME/bin
java -version
持久化
cat >> ~/.bashrc

练习:

ssh -V

ssh root@123.123.123.123

wget https://dragonwell.oss-cn-shanghai.aliyuncs.com/8/8.4.4-GA/Alibaba_Dragonwell_8.4.4-GA_Linux_x64.tar.gz

tar xf Alibaba_Dragonwell_8.4.4-GA_Linux_x64.tar.gz

./jdk8u262-b10/bin/java -version

cat >> ~/.bashrc << EOF export JAVA_HOME=$HOME/jdk8u262-b10 export PATH=$PATH:$JAVA_HOME/bin EOF

source ~/.bashrc

java -version

cat > Hello.java <<EOF public class Hello { public static void main(String[] args) { System.out.println("Hello World!"); } } EOF

javac Hello.java

java Hello

javap -c Hello

 

上一篇:ubuntu环境变量


下一篇:linux - 环境变量配置