[font=宋体]一、安装[/font][font=Times New Roman]jdk [/font]
[font=Times New Roman]1.[/font][font=宋体]下载安装[/font][font=Times New Roman]jdk [/font]
[font=宋体]([/font][font=Times New Roman]1[/font][font=宋体])、首先,在[/font][font=Times New Roman]http://java.sun.com[/font][font=宋体]找到要下载的[/font][font=Times New Roman]jdk[/font][font=宋体],下载自己需要的[/font][font=Times New Roman]jdk[/font][font=宋体]版本。我这里使用的是[/font][font=Times New Roman]jdk6[/font][font=宋体],得到的是一个名为[/font][font=Times New Roman]jdk-6u6-linux-i586-rpm.bin[/font][font=宋体]的文件。此文件当前为不可运行的[/font][font=Times New Roman]shell script[/font][font=宋体]。[/font][font=Times New Roman] [/font]
[font=宋体]([/font][font=Times New Roman]2[/font][font=宋体])、更改权限,提取[/font][font=Times New Roman]jdk[/font][font=宋体]安装文件:[/font][font=Times New Roman] [/font]
[font=Times New Roman] [/font][font=宋体]打开终端运行:[/font][font=Times New Roman]#chmod a+x
jdk-6u6-linux-i586-rpm.bin [/font]
[font=Times New Roman]# ./ jdk-6u6-linux-i586-rpm.bin [/font]
[font=宋体]在按提示输入[/font][font=Times New Roman]yes[/font][font=宋体]后,[/font][font=Times New Roman]jdk[/font][font=宋体]被解压到[/font][font=Times New Roman]./j2sdk1.4.2_04[/font][font=宋体]目录下。[/font][font=Times New Roman] [/font]
[font=宋体]([/font][font=Times New Roman]3[/font][font=宋体])、建立[/font][font=Times New Roman]java[/font][font=宋体]安装路径[/font][font=Times New Roman] [/font][font=宋体]:[/font][font=Times New Roman] [/font]
[font=Times New Roman]
# mkdir /usr/java [/font]
[font=宋体]([/font][font=Times New Roman]4[/font][font=宋体])、安装文件[/font][font=Times New Roman] [/font]
[font=Times New Roman]
# rpm -ivh jdk-6u6-linux-i586-rpm [/font]
[font=宋体]安装软件会将[/font][font=Times New Roman]JDK[/font][font=宋体]自动安装到[/font][font=Times New Roman]/usr/java/[/font][font=宋体]目录下。[/font][font=Times New Roman] [/font]
[font=Times New Roman] [/font]
[font=Times New Roman]2[/font][font=宋体]、配置环境变量[/font][font=Times New Roman] [/font]
[font=宋体]([/font][font=Times New Roman]1[/font][font=宋体])、打开文件:[/font][font=Times New Roman]#
vi
/etc/profile [/font]
[font=宋体]在文件中加入:[/font][font=Times New Roman] [/font]
[font=Times New Roman]export
JAVA_HOME=/usr/java/ jdk1.6.0_06 [/font]
[font=Times New Roman]export
PATH=$JAVA_HOME/bin:$PATH [/font]
[font=Times New Roman]export
CLASSPATH=.:JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar [/font]
[font=宋体]([/font][font=Times New Roman]2[/font][font=宋体])重新注销一下,然后打开终端输入:[/font][font=Times New Roman]# echo $JAVA_HOME [/font]
[font=Times New Roman]
# javac
[/font]
[font=Times New Roman]
# java [/font]
[font=Times New Roman]
#java -version [/font]
[font=宋体]出现的版本信息就是正确的。[/font][font=Times New Roman] [/font]
[font=宋体]此时我们可以写个[/font][font=Times New Roman]helloworld[/font][font=宋体]测试下[/font][font=Times New Roman]jdk[/font][font=宋体]是否安装好![/font][font=Times New Roman] [/font]
[font=Times New Roman]# vi HelloWord.java [/font]


xh_8998 于 2009-06-25 12:28:56发表:
哦!
我还以为你在做java呢!
下学期准被做嵌入式的论文,到时候还请多指教啊!
jagub 于 2009-06-18 15:09:33发表:
我只会java
xh_8998 于 2009-06-18 11:29:54发表:
jagub
您也在做java吗?
jagub 于 2009-06-18 08:13:24发表:
都说了:可以安装在非rpm系列的机器上。
xh_8998 于 2009-06-18 08:03:37发表:
初学的人要的不只是那个结果啊!
也许过程更好一点吧!
刘冲 于 2009-06-17 23:19:39发表:
既然机器是rpm的,为什么不选rpm的呢?才不管其他机器是什么格式的。xh_8998 于 2009-06-17 22:03:08发表:
????
miucat 于 2009-06-16 14:07:07发表:
jdk6貌似可以支持半透明窗口了
xh_8998 于 2009-06-16 13:59:36发表:
哦!{:3_107:}
下次装j2me时试试!
jagub 于 2009-06-16 13:50:43发表:
现在的系统一般都提供jdk的安装,直接rpm或者apt-get就能搞定。
如果非要自己安装的话
我觉得直接选择那个jdk-6u??-linux??-i586.bin比较好
可以安装在非rpm系列的机器上。