Linux 学习 二, 安装JDK
- 我是利用在window环境下载好JDK,然后传到VMware中linux中
- 下载JDK http://www.oracle.com/technetwork/java/javase/downloads/index.html
- window 中安装 SSH Client
- VMware 中的Linux 配置 SSH, Linux 设置桥接模式的 network,IP 和Window IP在同一个网段。
- 设置Linux IP, reference to: http://www.cnblogs.com/xd502djj/archive/2011/03/01/1967800.html
- IP 配置好以后,就需要配置SSH。what is SSH ? http://baike.baidu.com/view/16184.htm
- reference to SSH setting in Linux: http://wenku.baidu.com/view/9a92ba2acfc789eb172dc897.html or http://wenku.baidu.com/view/b5b12f150b4e767f5acfcefa.html
- 配置好SSH,将JDK 拷贝到Linux
- 开始安装,修改安装包可执行,开始安装。chmod 参考:http://www.cnblogs.com/younes/archive/2009/11/20/1607174.html,Linux中的bin文件参考:http://www.cnblogs.com/itech/archive/2010/02/01/1661248.html,Linux 中的 rpm,参考:http://www.cnblogs.com/xiaochaohuashengmi/archive/2011/10/08/2203153.html
- select 'yes' to follow the license terms
- 安装成功,发现java 被安装到 /usr/java/jdk......./bin 之下
- 添加到环境变量中
- Everything is done.
- Now, It is time to program.First of all, we are supposed to create a folder using "mkdir" command
- Then, create java file to write code using "vi". How to use vi,
- refer to:http://www.cnblogs.com/balaamwe/archive/2011/10/16/2213793.html
- Wirte code once, run anywhere. Use vi to create Dragon.java and Test.java
- Next step is compile the source code file. Make sure the two java file to locate in directory test/dragon/com/cnUse "javac" to compile the java file, use "java" to run