linux安装jdk8

您所在的位置:网站首页 盖公章用英语怎么说 linux安装jdk8

linux安装jdk8

#linux安装jdk8| 来源: 网络整理| 查看: 265

百度网盘jdk链接: 链接:https://pan.baidu.com/s/1EZI4kdSSxNPqlEYUq8P-xg 提取码:dvgt

1.上传jdk文件到opt目录 2.解压文件

tar -xvf jdk-8u162-linux-x64.tar.gz

3.设置环境变量

vi /etc/profile

添加以下配置

export JAVA_HOME=/opt/jdk1.8.0_162 export PATH=$JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

4.重新加载配置

source /etc/profile

5.验证是否安装完成

[root@aliyun opt]# java -version java version "1.8.0_162" Java(TM) SE Runtime Environment (build 1.8.0_162-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode) [root@aliyun opt]# java Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -d32 use a 32-bit data model if available -d64 use a 64-bit data model if available -server to select the "server" VM The default VM is server. -cp -classpath A : separated list of directories, JAR archives, and ZIP archives to search for class files. -D= set a system property -verbose:[class|gc|jni] enable verbose output -version print product version and exit -version: Warning: this feature is deprecated and will be removed in a future release. require the specified version to run -showversion print product version and continue -jre-restrict-search | -no-jre-restrict-search Warning: this feature is deprecated and will be removed in a future release. include/exclude user private JREs in the version search -? -help print this help message -X print help on non-standard options -ea[:...|:] -enableassertions[:...|:] enable assertions with specified granularity -da[:...|:] -disableassertions[:...|:] disable assertions with specified granularity -esa | -enablesystemassertions enable system assertions -dsa | -disablesystemassertions disable system assertions -agentlib:[=] load native agent library , e.g. -agentlib:hprof see also, -agentlib:jdwp=help and -agentlib:hprof=help -agentpath:[=] load native agent library by full pathname -javaagent:[=] load Java programming language agent, see java.lang.instrument -splash: show splash screen with specified image See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details. [root@aliyun opt]# javac Usage: javac where possible options include: -g Generate all debugging info -g:none Generate no debugging info -g:{lines,vars,source} Generate only some debugging info -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are used -classpath Specify where to find user class files and annotation processors -cp Specify where to find user class files and annotation processors -sourcepath Specify where to find input source files -bootclasspath Override location of bootstrap class files -extdirs Override location of installed extensions -endorseddirs Override location of endorsed standards path -proc:{none,only} Control whether annotation processing and/or compilation is done. -processor [,,...] Names of the annotation processors to run; bypasses default discovery process -processorpath Specify where to find annotation processors -parameters Generate metadata for reflection on method parameters -d Specify where to place generated class files -s Specify where to place generated source files -h Specify where to place generated native header files -implicit:{none,class} Specify whether or not to generate class files for implicitly referenced files -encoding Specify character encoding used by source files -source Provide source compatibility with specified release -target Generate class files for specific VM version -profile Check that API used is available in the specified profile -version Version information -help Print a synopsis of standard options -Akey[=value] Options to pass to annotation processors -X Print a synopsis of nonstandard options -J Pass directly to the runtime system -Werror Terminate compilation if warnings occur @ Read options and filenames from file


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3