Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Debian (Wheezy) Install Java environment / replace OpenJDK as the SUN JDK     - Python configuration tortuous road of third-party libraries Numpy and matplotlib (Programming)

- Install Mac OS X 10.9 systems VMware10 (Linux)

- Wildcards and special symbols usage comments under Linux (Linux)

- Fedora 22 install Adobe Flash Player (Linux)

- Static member variable modified (Programming)

- To install the Ubuntu Touch emulator on Ubuntu (Linux)

- Linux data redirection (Linux)

- How to display a dialog Bash Shell script (Programming)

- Java class loading order (Programming)

- Nagios (centreon) monitoring LVS (Server)

- Linux system security norms (Linux)

- Oracle creates split and splitstr functions (Database)

- Linux NFS service fixed ports and firewall configuration (Linux)

- Define and modify strings principle in Python (Programming)

- Ceph Source Analysis: Network Module (Server)

- Configuring a Linux operating system security management services (Linux)

- Linux operating tips: Can not open file for writing or operation not permitted solution (Linux)

- TCP network communication Java Programming (Programming)

- Linux / Windows setup is complete port range (Linux)

- Help you to see Linux system architecture type 5 Common Commands (Linux)

 
         
  Debian (Wheezy) Install Java environment / replace OpenJDK as the SUN JDK
     
  Add Date : 2018-11-21      
         
       
         
  Debian (Wheezy) Install Java environment / replace OpenJDK as the SUN JDK

Because the project needs, so you want to install the Java environment on the machine.

1, go http://www.Oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html download, select Accept License Agreement

Select the linux x64 of jdk-7u71-linux-x64.tar.gz

2, followed by # to find a directory to put the sun JDK, here we put / usr / java, and a digital version to indicate, for example java8 in / usr / java / java8, java7 in / usr / java / java7

Create / usr / java directory, and then extracting archive, move to / usr / java / java7

#mkdir / usr / java && tar -zxvf jdk-7u71-linux-x64.tar.gz && mv jdk1.7.0_71 / usr / java / java7

3, write java environment variables

Opened with the editor of your .bashrc file. This has two, one in /root/.bashrc, in a / home / your username / .bashrc (no write / etc / environment is not want to affect the overall system environment variables)

Add the following contents and save under.

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

then

#source /root/.bashrc cut down again to your user source can be.
#echo $ JAVA_HOME
/ Usr / java / java7

For openjdk not installed, then the direct input terminal

# / Usr / java / java7 / bin / java -version

Then we begin to make links. Bin was added to the system, using the update-alternatives command to maintain the system flexible connection, by updating this to let the system know which command. The last parameter is the priority. The higher the better.

# Update-alternatives --install / usr / bin / java java / usr / java / java7 / bin / java 1100
# Update-alternatives --install / usr / bin / javac javac / usr / java / java7 / bin / javac 1100

Next, configure, if you install openJDK, where you can chose, because in front of me gave a higher priority 1100, so now is already the default / usr / java / java7 under the.

# Update-alternatives --config java

# Update-alternatives --config javac

root @ debian: / # update-alternatives --config java
There are 2 choices for the alternative java (providing / usr / bin / java).


  Selection Path Priority Status
-------------------------------------------------- ----------
  0 / usr / java / java7 / bin / java 1100 auto mode
* 1 / usr / java / java7 / bin / java 1100 manual mode
  2 / usr / lib / jvm / java-6-openjdk-amd64 / jre / bin / java 1061 manual mode

root @ debian: / # update-alternatives --config javac
There are 2 choices for the alternative javac (providing / usr / bin / javac).

  Selection Path Priority Status
-------------------------------------------------- ----------
* 0 / usr / java / java7 / bin / javac 1100 auto mode
  1 / usr / java / java7 / bin / javac 1100 manual mode
  2 / usr / lib / jvm / java-6-openjdk-amd64 / bin / javac 1061 manual mode

Ok then directly java7 is installed in the terminal input validation

#java -version

java version "1.7.0_71"
Java (TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot (TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
     
         
       
         
  More:      
 
- Windows Desktop use VNC remote connect Linux (Linux)
- Ubuntu 14.10 How to install office suite Calligra Suite 2.8.7 (Linux)
- Usage Linux device tree (Programming)
- Easy to install CentOS 6.6 desktop environment (Linux)
- How to install Virtualbox 4.3.20 in Ubuntu 14.04 (Linux)
- AngularJS - Custom instructions (Programming)
- Linux, rename the file or folder (mv command and rename command) (Linux)
- Java rewrite the hashcode method (Programming)
- PULL operation mechanism parsing XML Comments (Programming)
- CUDA (including GPU card driver) installation process under Ubuntu (Linux)
- Linux under DB2SQL1024N A database connection does not exist. SQLS (Database)
- CentOS6.7 text installation system (Linux)
- Linux system started to learn: the Linux syslog (Linux)
- Openfire achieve load balancing cluster by Nginx (Server)
- Python 3.5 will support Async / Await Asynchronous Programming (Programming)
- Ubuntu Linux installation GAMIT10.6 (Linux)
- mysqldump issue a note (Database)
- CentOS permanently banned from running in the background PackageKit (Linux)
- Linux server dual-card dual-IP and single-card dual-IP configuration method (ReHat / CentOS) (Server)
- Ubuntu install Tonido private cloud services (Server)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.