Install jdk 1.7 under linux

tags: linux  jdk 1.7

 

1 Download jdk 1.7 linux versionhttp://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

 

2. Extract the downloaded file to/usr/local/development/jdk1.7.0_04table of Contents.

 

3. Create a file/etc/profile.d/development.sh, copy the following to the file.

export JAVA_HOME=/usr/local/development/jdk1.7.0_04
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

 

4 Modify the jdk used by the system by default:

   update-alternatives --install /usr/bin/java java /usr/local/development/jdk1.7.0_04/bin/java 300

   update-alternatives --install /usr/bin/javac javac /usr/local/development/jdk1.7.0_04/bin/javac 300

 

5. Restart your computer and use the commandjava -versionCheck if the JDK is installed successfully.

 

Intelligent Recommendation

Sample program 015--HSV or RGB two-dimensional histogram

// 022 2D histogram. cpp: Defines the entry point for the console application. // #include "stdafx.h" #include <cv.h> #include <highgui.h> int main( int argc, char** argv ) { &nb...

Oracle statistics

Oracle statisticsIs a set of data stored in the data dictionary, describing the details of the object in the oracle database from multiple dimensions. The CBO will use these statistics to calculate th...

Introduction to machine learning primary algorithm (2)

Reference materials:The difference and connection between logistic regression and linear regression、Logistic regression principle、Regularization、Sample imbalance solution Table of Contents 1. The conn...

iOS development and development of self-use macro definition

A small partner is asking me the macro definitions I often use, and I will record them. If there is a new one, I will be very comfortable now. The macro is global, and since it is global, it can cause...

float

CSS often uses floating layout, which is the float:left or float:right that is often seen. In simple terms, the former is left floating (the non-floating elements to the left and the front are floatin...

More Recommendation

Design mode: Observer mode

The demand for the observer mode is: A Object (observer) is highly sensitive to some changes to B objects (observed), and needs to be reacted in a changing in B, but we can't always stare at B, so it ...

Android M Judging whether the phone has a SIM card reverse

First, the general judgment is looking from the database: First: then: Finally: Cycle cursors are added to Sublist: That is: \ frameworks \ OPT \ Telephony \ SRC \ Java \ Com \ Android \ INTERNAL \ Te...

Talking about OkHttpUtils in android development

okhttputils is a secondary encapsulation of csdn Hongyang Great God based on the okhttp network request. Compared with other retrofit frameworks, I still like to use Hongyang Great God's okhttputils, ...

SimpleDateFormat that is not thread-safe

8.5 SimpleDateFormat is not thread safe SimpleDateFormat is a tool class for formatting and parsing dates provided by Java. It should be used frequently in daily development, but because it is thread-...

Hello World: My first game Tetris (C#)

I used a program written in one day. The first time I touched this, I used the hello world program to write down the implementation method. I hope that you can not despise the heroes and just touch th...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top