大数据新手之路一:安装JDK

Ubuntu16.04

 

1.下载jdk-8u192-linux-x64.tar.gz

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

 

2.解压到/usr/local/java文件夹中

 

3.设置配置文件/etc/profile文件,增加java的路径

①vi /etc/profile

export JAVA_HOME=/usr/local/java
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=$JAVA_HOME/lib

②让配置文件立即生效

source /etc/profile

③如果想在当前用户环境下永久生效,可以在~/.bashrc中加入source /etc/profile

 

4.检查java环境是否生效

java -version

 

以上,JDK安装完毕。

 

PS:

1.JDK/SERVER JRE/JRE的区别(JDK:包含了jre。java开发者使用,用于java程序的编译等;Server JRE:用于服务端,包括JVM监视器等,不包括浏览器集成插件;JRE:覆盖了大部分终端需求,可以理解为用于客户端;java程序的运行环境。)

  • Software Developers: JDK (Java SE Development Kit). For Java Developers. Includes a complete JRE plus tools for developing, debugging, and monitoring Java applications.
  • Administrators running applications on a server:  Server JRE (Server Java Runtime Environment) For deploying Java applications on servers. Includes tools for JVM monitoring and tools commonly required for server applications, but does not include browser integration (the Java plug-in), auto-update, nor an installer. Learn more arrow
  • End user running Java on a desktop: JRE: (Java Runtime Environment). Covers most end-users needs. Contains everything required to run Java applications on your system.

 

2.J2SE/J2EE/J2ME

SE:Standard Edition

EE:Enterprise Edition

ME:Micro Edition

 

posted @ 2018-03-05 17:42  pcwen.top  阅读(1004)  评论(0编辑  收藏  举报
pcwen.top