FC4下快速安装jdk1.5.0(转载)
时间:2006-05-19 来源:zhengacer
FC4下快速安装jdk1.5.0
以前一直使用1.4.2今天升了下级,发现1.5.0的控制台中文全是方块,看了网上相关的介绍,发现修改fonts.dir的方法不起作用,就研究了一下,现在把方法贴出来,顺便把安装方法一起写下。 1.下载jdk1.5.0,这个就不用说了吧,到处都有,还是贴个地址吧 http://ftp.isu.edu.tw/pub/Sun/java/J2SE/5.0/linux/ 2.安装./jdk-1_5_0-linux-i586.bin ,然后把解压的目录放到如/usr/local/目录下。 够easy吧 3.设置环境变量,个人建议修改用户的profile,linux下就是用户根目录下的.bashrc,加入 JAVA_HOME=/usr/local/jdk1.5.0 PATH=$PATH:$JAVA_HOME/bin CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export JAVA_HOME PATH CLASSPATH 4.为firefox和konqueror添加插件 firefox: ln -s /usr/local/jdk1.5.0/jre/plugin/i386/ns7/libjavaplugin_oji.so /root/.mozilla/plugins/ (注意不要考备到plugins/目录下,做链接就ok,不然可能会出问题) konqueror:设置>配置konqueror>java和javascript--java执行程序的路径:/usr/local/jdk1.5.0/jre/bin/java 5.字体设置 将/usr/local/jdk1.5.0/jre/lib/fontconfig.*备份到其他地方然后下载我上传的文件到/usr/local/jdk1.5.0/jre/lib/下,把txt去掉。 把文件打开查找simsun.ttc,按照你们自己的设置稍稍修改一下路径就可以了。 但最好不要用simsun.ttc因为它不是免费的,找一个免费的(自己动动手)或者用VeraSansYuanTi(不知道这个是不是免费的) ========== .bashrc 是终端的配置把我觉得这个方法也许会更好 Create a file called java.sh in /etc/profile.d/ (If you're not too sure about how to do this, the easiest way is gedit /etc/profile.d/java.sh) This file should contain the following lines (with the first line modified appropriately, according to what's actually in /usr/java/): export JAVA_HOME="/usr/java/j2re1.4.2_02" export JAVA_PATH="$JAVA_HOME" export PATH="$PATH:$JAVA_HOME/bin" Type chmod +x /etc/profile.d/java.sh Java should now work properly. You may need to restart your computer for certain things to function properly. To install the browser plugin for java, as root, do: ln -sf /usr/java//plugin/i386/ns610-gcc32/libjavaplugin_oji.so /usr/lib/mozilla-1.4.1/plugins -- note that you need to replace with the name of the actual directory that's there. ====== jdk1.5中文显示笨办法。 在jre/lib/fonts目录建立一个目录叫fallback 把simsun.ttf拷贝到那里或建立个符号连接 都 可以。 就可以显示中文了。 |
相关阅读 更多 +
排行榜 更多 +