Installation of the 64-bit JDK on Linux Platforms
jdk-8uversion-linux-x64.tar.gz
-
Download the file.
Before the file can be downloaded, you must accept the license agreement. The archive binary can be installed by anyone (not only root users), in any location that you can write to. However, only the root user can install the JDK into the system location.
-
Change directory to the location where you would like the JDK to be installed, then move the .tar.gz archive binary to the current directory.
-
Unpack the tarball and install the JDK.
% tar zxvf jdk-8uversion-linux-x64.tar.gz
The Java Development Kit files are installed in a directory called jdk1.8.0_version in the current directory.
-
Delete the .tar.gz file if you want to save disk space.
1
|
echo
"PATH=$PATH:/usr/lib/java/jdk1.8.0_65/bin"
>> ~/.bashrc
|
1
|
source
~.
/bashrc
|
1
2
3
4
5
6
|
xpleaf@leaf:~$ java
用法: java [-options] class [args...]
(执行类)
或 java [-options] -jar jarfile [args...]
(执行 jar 文件)
......................
|