linux下java解决方案[z]
我使用的是mandrake9.0所以就在这块写一些,其实对于java的设置在哪个版本都差不多!
首先下载j2sdk1.4.1_01,放到你喜欢的目录
我放在了/home/j2sdk1.4.1
我的profile中是
#java
JAVA_HOME=/home/j2sdk1.4.1
export JAVA_HOME
CLASSPATH=.JAVA_HOME/libJAVA_HOME/jre/lib
export CLASSPATH
PATH=$PATHJAVA_HOME/binJAVA_HOME/jre/bin
export PATH
接着在你的用户目录下的.bashrc中加入
JAVA_HOME=/home/j2sdk1.4.1
export JAVA_HOME
PATH=$PATHJAVA_HOME/bin
export PATH
这样就可以在终端执行java,javac命令了.但是你不这样做,系统也是认得!
关于mozilla的设置
为了使mozilla具有java-vm环境.你可以在JAVA_HOME/jre/plugin/i386/ns610/ 下发现它的插件,然后把它链接到mozilla_home/plugins下!
命令:ln -s JAVA_HOME/jre/plugin/i386/ns610/libjavaplugin_oji.so mozilla_home/plugins
记住不要复制过去!
还有:ln -s JAVA_HOME/jre/plugin/i386/ns610/libjavaplugin_oji.so ~/.mozilla/plugins (没有plugins目录,就创建一个)
ln -s JAVA_HOME/jre/plugin/i386/ns610/libjavaplugin_oji.so ~/.netscape/plugins
ln -s JAVA_HOME/jre/plugin/i386/ns610/libjavaplugin_oji.so ~/.netscape6/plugins
这样就差不多了!
过于java的中文环境
如果你试着使用配置好的mozilla进入yahoo 的娱乐游戏.你就会发现所有的applet 游戏.字体都是方块!
设置的大体方法是:
1.应该按照 bbs中一些高手的mandrake美化环境的贴子,把windows的simsun 复制到一个目录,并且一步一步的设置.
2.把simsun.ttf 复制到JAVA_HOME/jre/lib/fonts下,修改其中的fonts.dir,加入 simsun.ttf -misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
simsun.ttf -misc-simsun-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0
3.打开JAVA_HOME/jre/lib/font.properties.zh.Turbo
我的改动是这样,动作比较大.
请看我的文件:
# @(#)font.properties.zh.Turbo.linux 1.4 02/06/10
#
# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
#
# Component Font Mappings
#
#serif.0=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1
#serif.1=-tlc-song-medium-r-normal--*-%d-*-*-c-*-gbk-0
serif.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
serif.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
serif.italic.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
serif.italic.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
serif.bold.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
serif.bold.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
serif.bolditalic.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
serif.bolditalic.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
sansserif.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
sansserif.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
sansserif.italic.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
sansserif.italic.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
sansserif.bold.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
sansserif.bold.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
sansserif.bolditalic.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
sansserif.bolditalic.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
monospaced.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
monospaced.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
monospaced.italic.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
monospaced.italic.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
monospaced.bold.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
monospaced.bold.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
monospaced.bolditalic.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
monospaced.bolditalic.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
dialog.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
dialog.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
dialog.italic.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
dialog.italic.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
dialog.bold.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
dialog.bold.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
dialog.bolditalic.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
dialog.bolditalic.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
dialoginput.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
dialoginput.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
dialoginput.italic.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
dialoginput.italic.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
dialoginput.bold.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
dialoginput.bold.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
dialoginput.bolditalic.0=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1
dialoginput.bolditalic.1=-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
# Missing Glyph Character
#
default.char=274f
# Component Font Character Encodings
#
fontcharset.serif.0=sun.io.CharToByteISO8859_1
fontcharset.serif.1=sun.awt.motif.CharToByteX11GBK
fontcharset.sansserif.0=sun.io.CharToByteISO8859_1
fontcharset.sansserif.1=sun.awt.motif.CharToByteX11GBK
fontcharset.monospaced.0=sun.io.CharToByteISO8859_1
fontcharset.monospaced.1=sun.awt.motif.CharToByteX11GBK
fontcharset.dialog.0=sun.io.CharToByteISO8859_1
fontcharset.dialog.1=sun.awt.motif.CharToByteX11GBK
fontcharset.dialoginput.0=sun.io.CharToByteISO8859_1
fontcharset.dialoginput.1=sun.awt.motif.CharToByteX11GBK
# Exclusion Ranges
#
# XFontSet Information
#
fontset.serif.plain=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.serif.italic=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.serif.bold=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.serif.bolditalic=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.sansserif.plain=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.sansserif.italic=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.sansserif.bold=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.sansserif.bolditalic=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.monospaced.plain=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.monospaced.italic=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.monospaced.bold=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,1\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.monospaced.bolditalic=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.dialog.italic=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.dialog.bold=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.dialog.bolditalic=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.dialog.plain=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.dialoginput.italic=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.dialoginput.bold=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.dialoginput.bolditalic=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.dialoginput.plain=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
fontset.default=\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-*-110-*-*-c-*-gb2312.1980-0
appendedfontpath=/usr/lib/X11/fonts/TrueType
切记,appendedfontpath=/usr/lib/X11/fonts/TrueType是我在设置mandrake字体的目录,它是加入XF86Config-4的那个路径,但是j2sdk默认不是这样,它是我改过的路径.
我还把font.properties.zh.Turbo另存成了font.properties覆盖了原文件,我提醒一下,最好备份配置文件.大家一定要把font.properties.zh.Turbo复制成font.properties覆盖原文件,否则使用mozilla运行java虚拟机,会重启X windows.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论