Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Ubuntu 15.04 installed JDK and configured as the default JDK     - UNIX file permissions in the "set user ID bit" (Linux)

- Go powerful development server simple example (Server)

- Java enum use (Programming)

- The Linux disguised as windows to make the system more secure (Linux)

- MacBook Air install Ubuntu dual system (Linux)

- Windows Desktop use VNC remote connect Linux (Linux)

- How to modify the Emacs Major Mode Shortcuts (Linux)

- Enable Intel Rapid Start in GNU / Linux (Linux)

- According to the national position on how to block traffic in Linux (Server)

- Ora-00600 [fast hot Atkins soft _ that _ Oh, of course not _less_ profile] (Database)

- How to find the available network adapter on Ubuntu (Linux)

- TypeScript basic grammar (Programming)

- Build RubyMine + Ruby On Rails + MySQL development environment under Windows (Server)

- Linux system Perl Lite netstat (Linux)

- Linux initialization init system - UpStart (Linux)

- Android in the coordinate system and a method to obtain the coordinates (Programming)

- Linux rename command usage in learning to modify the file name (Linux)

- Scala REPL Shell call (Programming)

- CentOS 6/7 Series Docker Installation (Linux)

- Let the router be your security barrier against external attack (Linux)

 
         
  Ubuntu 15.04 installed JDK and configured as the default JDK
     
  Add Date : 2017-01-08      
         
       
         
  Ubuntu install JDK

System versions: Ubuntu 15.04 x64
JDK version: jdk-8u60-linux-x64

1. Check the system-digit, enter the following command to

getconf LONG_BIT

2. Download the file corresponding to the JDK, I am here to download the jdk-8u60-linux-64.tar.gz

3. Create a directory as the JDK installation directory, select the installation location here is: / usr / java /

sudo mkdir / usr / java

4. Unzip the file with / under usr / java / directory, file download location is in the download directory

cd download
sudo tar zxvf jdk-8u60-linux-x64.tar.gz -C / usr / java /

5. Go to / usr / java / directory, to rename the folder (this step is not necessary, but in order to facilitate the configuration environment variable, it is recommended to do so)

cd / usr / java /
sudo mv jdk1.8.0_60 jdk_8u60

6. Configure the system environment variables

sudo gedit / etc / environment

Incorporate the following red font

PATH = "/ usr / local / sbin: / usr / local / bin: / usr / sbin: / usr / bin: / sbin: / bin: / usr / games: / usr / local / games: $ JAVA_HOME / bin"
export CLASSPATH =:. $ JAVA_HOME / lib: $ JAVA_HOME / jre / lib
export JAVA_HOME = / usr / java / jdk_8u60

After editing Save and Close, enter the following command to make the environment variables to take effect

source / etc / environment

7. Use the echo command to check the configuration of environment variables

echo $ JAVA_HOME
Output / usr / java / jdk_8u60
echo $ CLASSPATH
Output:. / Usr / java / jdk_8u60 / lib: / usr / java / jdk_8u60 / jre / lib
echo $ PATH
Output / usr / local / sbin: / usr / local / bin: / usr / sbin: / usr / bin: / sbin: / bin: / usr / games: / usr / local / games: / usr / java / jdk_8u60 / bin

8. Review the installation version:

java -version
Picked up JAVA_TOOL_OPTIONS: -javaagent: /usr/share/java/jayatanaag.jar
java version "1.8.0_60"
Java (TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot (TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

9. Set the environment variable for all users, or after the restart still can not find the java command

sudo gedit / etc / profile

Add the following to (Note Replace Path):

#set Java environment

JAVA_HOME = / usr / java / jdk_8u60
export JRE_HOME = / usr / java / jdk_8u60 / jre
export CLASSPATH =:. $ JAVA_HOME / lib: $ JRE_HOME / lib: $ CLASSPATH
export PATH = $ JAVA_HOME / bin: $ JRE_HOME / bin: $ PATH

10. Restart the computer, the configuration.

11. In the end? No! ! !

If Myeclipse and other IDE or install multiple versions of jdk please continue to look down

12. Modify the default JDK (Note Replace Path)

sudo update-alternatives --install "/ usr / bin / java" "java" "/ usr / java / jdk_8u60 / bin / java" 300
sudo update-alternatives --install "/ usr / bin / javac" "javac" "/ usr / java / jdk_8u60 / bin / javac" 300
sudo update-alternatives --install "/ usr / bin / javaws" "javaws" "/ usr / java / jdk_8u60 / bin / javaws" 300

These are the establishment of links to different commands, if multiple paths exist JDK only need to replace the re-run it again to create a link, execute the following command to select the link if every option is only set up a link, the system does not provide the option, if it exists a plurality of links, if necessary, select different options

sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
     
         
       
         
  More:      
 
- Depth understanding of C language (Programming)
- Smooth upgrade to OpenSSH 6.7 Procedure (Linux)
- DB2 commonly used scripting sort out (Database)
- 10 Linux in the passwd command examples (Linux)
- Linux System Getting Started Tutorial: How to Force Change your password at next logon Linux (Linux)
- Use calcurse schedule appointments and to-do in the Linux terminal (Linux)
- Ubuntu 14.04 / 14.10 how to install FFmpeg 2.5.1 (Linux)
- How to install Linux on a MacBook Pro Retina (Linux)
- Ubuntu under VirtualBox virtual machine serial port settings (Linux)
- GNU / Linux enable Intel Rapid Start (Linux)
- MacBook Air install Ubuntu dual system (Linux)
- Fedora 23 How to install LAMP server (Server)
- Linux five security TIPS (Linux)
- Redis-2.8.17 installation and configuration process some errors (Linux)
- After restarting network services, DNS address failure (Linux)
- C ++ why we chose to use the smart pointer (Programming)
- MariaDB database storage path modify configuration issues (Database)
- Oracle to use full-text indexing (Database)
- Top 10: HTML5, JavaScript 3D game engine and framework (Linux)
- Zabbix installation under Linux (Server)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.