JAVA/ubuntu:修订间差异
来自康健生活
无编辑摘要 |
|||
| 第13行: | 第13行: | ||
=== 环境变量 === | === 环境变量 === | ||
{{shc|<syntaxhighlight lang="bash"> | {{shc|<syntaxhighlight lang="bash"> | ||
sudo | sudo vi /etc/profile</syntaxhighlight>|$}} | ||
{{Hcdiff|/etc/profile|<syntaxhighlight lang="javascript"> | |||
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) | |||
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). | |||
export JAVA_HOME=/usr/lib/jvm/openjdk-14-jdk-headless | |||
export JRE_HOME=$JAVA_HOME/jre | |||
export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH | |||
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH | |||
if [ "${PS1-}" ]; then | |||
if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then | |||
</syntaxhighlight>|<syntaxhighlight lang="javascript"> | |||
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) | |||
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). | |||
if [ "${PS1-}" ]; then | |||
if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then | |||
</syntaxhighlight>}} | |||
{{shc|<syntaxhighlight lang="bash"> | |||
sudo source /etc/profile</syntaxhighlight>|$}} | |||
== oracle == | == oracle == | ||
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html | http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html | ||