1. install python-software-properties
... $ sudo apt-get install python-software-properties ...2. add repository ppa:webupd8team/java
... $ sudo add-apt-repository ppa:webupd8team/java ...3. update repository
... $ sudo apt-get update ...4. install oracle-jdk7-installer
... $ sudo apt-get install oracle-jdk7-installer ...5. check java version
... $ java -version ...6. set java home
6.1 find java path installed
... $ find ./ -name java ... .. /usr/lib/jvm/java-7-oracle/bin/java ...6.2 install vim (for edit config java home file)
... $ sudo apt-get install vim ...6.3 edit ~/.batchrc
... $ cd ~ $ sudo apt-get install vim $ vi .batchrc ...6.4 on vi put <i> for into vi insert mode and add this to end line
... export JAVA_HOME= /usr/lib/jvm/java-7-oracle export PATH=$PATH:$JAVA_HOME/bin ...6.5 save : put<Esc> for out from vi insert mode then put <:wq> for save .batchrc
7. test java
.. $ vi HelloWorld.java ..
put<i> then write code following
put<Esc> for exit from insert mode then put<:wq> for save
compile(javac) and run code(java)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น