Skip to content

JAVA相关知识

This page demonstrates some of the built-in markdown extensions provided by VitePress.

JDK安装

跳转到oracle下载JDK, 推荐使用JDK17

windows安装

傻瓜式安装后,配置环境变量,配置JAVA_HOME: Title

配置path变量,配置PATH: Title

LINUX安装

推荐使用tar包安装;解压tar包之后,配置环境变量 修改/etc/profile文件: vim /etc/profile

JDK17:

md
export JAVA_HOME=/usr/lib/jdk17/jdk-17.0.10
export CLASSPATH=.:$JAVA_HOME/lib/
export PATH=.:$JAVA_HOME/bin:$PATH

JDK8:

md
export JAVA_HOME=/usr/local/jdk1.8.0_191
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin
export PATH=$PATH:${JAVA_PATH}

生效配置文件:

md
source /etc/profile

检查配置是否生效:

md
java -version

当显示jdk版本信息,则表示安装成功 Title

More

Check out the documentation for the full list of markdown extensions.