第一步:官网下载JDK 和 netbeans
JDK :http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html;
Netbeans:http://netbeans.org/
第二步:安装JDK
$ cd ~/Downloads
$ tar -xvzf jdk-7u4-linux-x64.tar.gz (这两步解压)
$ sudo mv jdk1.7.0_04 /usr/lib/jvm/ (移到jvm下面,目的不详)
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_04/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_04/bin/java 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.7.0_04/bin/javaws 1
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javaws (以上照做就行)
最后检测:$ java -version
结果:
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
第三步:安装netbeans
官网下载完后,是一个.sh的文件,so:
sh netbeans-7.3-linux.sh (据说也可以:$./ netbeans-7.3-linux.sh)
ok~
相关链接:
http://www.cnblogs.com/zhongyuan/p/3895563.html //我的最新文档
http://blog.csdn.net/icephone/article/details/8253154