正确的 java 设置!(更新)
注意:我们的系统根本没有 j2sdk,只有 j2re!如果自己改为 j2sdk,需要自己修改 JDK_VERSION 变量。正确的设置应该是:
# cat /etc/profile.d/magic-profile.sh
#!/bin/sh
#java settings
JDK_VERSION=j2re1.4.2_05
JAVA_HOME=/usr/java/$JDK_VERSION
CLASSPATH=$JAVA_HOME/lib/rt.jar:.
JAVA_FONTS=$JAVA_FONTS:/usr/share/fonts/ttf/zh_CN
PATH=$PATH:$JAVA_HOME/bin
export JDK_VERSION JAVA_HOME CLASSPATH JAVA_FONTS PATH
#azureus
export PATH=/usr/bt/azureus:$PATH
#disable kde ipv6 support
export KDE_NO_IPV6=true
请看
[root@MagicLinux ~]# tree /usr/java/
/usr/java/
`-- j2re1.4.2_05
|-- CHANGES
|-- COPYRIGHT
|-- ControlPanel.html
|-- LICENSE
|-- README
|-- THIRDPARTYLICENSEREADME.txt
|-- Welcome.html
|-- bin
| |-- ControlPanel
| |-- java
| |-- java_vm
| |-- keytool
| |-- kinit
| |-- klist
| |-- ktab
| |-- orbd
| |-- policytool
| |-- rmid
| |-- rmiregistry
| |-- servertool
| `-- tnameserv
|-- javaws
| |-- cacerts
| |-- javalogo52x88.gif
| |-- javaws
| |-- javaws-l10n.jar
| |-- javaws.jar
| |-- javaws.policy
| |-- javawsbin
| |-- readme.html
| |-- readme_de.html
| |-- readme_es.html
| |-- readme_fr.html
| |-- readme_it.html
| |-- readme_ja.html
| |-- readme_ko.html
| |-- readme_sv.html
| |-- readme_zh_CN.html
| |-- readme_zh_TW.html
| |-- resources
| | |-- copyright.jpg
| | |-- messages.properties
| | |-- messages_de.properties
| | |-- messages_es.properties
| | |-- messages_fr.properties
| | |-- messages_it.properties
| | |-- messages_ja.properties
| | |-- messages_ko.properties
| | |-- messages_sv.properties
| | |-- messages_zh_CN.properties
| | |-- messages_zh_TW.properties
| | |-- miniSplash.jpg
| | `-- splash.jpg
| `-- sunlogo64x30.gif
|-- lib
| |-- applet
| |-- audio
| | `-- soundbank.gm
| |-- charsets.jar
| |-- cmm
| | |-- CIEXYZ.pf
| | |-- GRAY.pf
| | |-- LINEAR_RGB.pf
| | |-- PYCC.pf
| | `-- sRGB.pf
| |-- content-types.properties
| |-- ext
| | |-- dnsns.jar
| | |-- ldapsec.jar
| | |-- localedata.jar
| | `-- sunjce_provider.jar
| |-- flavormap.properties
| |-- font.properties
| |-- font.properties.Redhat6.1
| |-- font.properties.Redhat8.0
| |-- font.properties.SuSE8.0
| |-- font.properties.ja
| |-- font.properties.ja.Redhat6.1
| |-- font.properties.ja.Redhat6.2
| |-- font.properties.ja.Redhat7.2
| |-- font.properties.ja.Redhat7.3
| |-- font.properties.ja.Redhat8.0
| |-- font.properties.ja.Turbo
| |-- font.properties.ja.Turbo6.0
| |-- font.properties.ja_JP.Sun
| |-- font.properties.ja_JP.Sun2003
| |-- font.properties.ja_JP_UTF8.Sun
| |-- font.properties.ja_JP_UTF8.Sun2003
| |-- font.properties.ko.Redhat
| |-- font.properties.ko_KR.Sun
| |-- font.properties.ko_KR_UTF8.Sun
| |-- font.properties.ko_KR_UTF8.Sun2003
| |-- font.properties.zh.Turbo
| |-- font.properties.zh_CN.Redhat
| |-- font.properties.zh_CN.Redhat2.1
| |-- font.properties.zh_CN.Sun
| |-- font.properties.zh_CN_UTF8.Sun
| |-- font.properties.zh_HK.Sun
| |-- font.properties.zh_HK_UTF8.Sun
| |-- font.properties.zh_HK_UTF8.Sun2003
| |-- font.properties.zh_TW.Redhat
| |-- font.properties.zh_TW.Sun
| |-- font.properties.zh_TW_UTF8.Sun
| |-- font.properties.zh_TW_UTF8.Sun2003
| |-- fonts
| | |-- LucidaBrightDemiBold.ttf
| | |-- LucidaBrightDemiItalic.ttf
| | |-- LucidaBrightItalic.ttf
| | |-- LucidaBrightRegular.ttf
| | |-- LucidaSansDemiBold.ttf
| | |-- LucidaSansDemiOblique.ttf
| | |-- LucidaSansOblique.ttf
| | |-- LucidaSansRegular.ttf
| | |-- LucidaTypewriterBold.ttf
| | |-- LucidaTypewriterBoldOblique.ttf
| | |-- LucidaTypewriterOblique.ttf
| | |-- LucidaTypewriterRegular.ttf
| | `-- fonts.dir
| |-- i386
| | |-- awt_robot
| | |-- client
| | | |-- Xusage.txt
| | | |-- libjsig.so -> ../libjsig.so
| | | `-- libjvm.so
| | |-- jvm.cfg
| | |-- libJdbcOdbc.so
| | |-- libawt.so
| | |-- libcmm.so
| | |-- libdcpr.so
| | |-- libdt_socket.so
| | |-- libfontmanager.so
| | |-- libhprof.so
| | |-- libioser12.so
| | |-- libjaas_unix.so
| | |-- libjava.so
| | |-- libjavaplugin_jni.so
| | |-- libjawt.so
| | |-- libjcov.so
| | |-- libjdwp.so
| | |-- libjpeg.so
| | |-- libjsig.so
| | |-- libjsound.so
| | |-- libjsoundalsa.so
| | |-- libmlib_image.so
| | |-- libnative_chmod.so
| | |-- libnet.so
| | |-- libnio.so
| | |-- librmi.so
| | |-- libverify.so
| | |-- libzip.so
| | |-- native_threads
| | | `-- libhpi.so
| | `-- server
| | |-- Xusage.txt
| | |-- libjsig.so -> ../libjsig.so
| | `-- libjvm.so
| |-- im
| | |-- indicim.jar
| | `-- thaiim.jar
| |-- images
| | `-- cursors
| | |-- cursors.properties
| | |-- invalid32x32.gif
| | |-- motif_CopyDrop32x32.gif
| | |-- motif_CopyNoDrop32x32.gif
| | |-- motif_LinkDrop32x32.gif
| | |-- motif_LinkNoDrop32x32.gif
| | |-- motif_MoveDrop32x32.gif
| | `-- motif_MoveNoDrop32x32.gif
| |-- jce.jar
| |-- jsse.jar
| |-- jvm.hprof.txt
| |-- jvm.jcov.txt
| |-- locale
| | |-- de
| | | `-- LC_MESSAGES
| | | `-- sunw_java_plugin.mo
| | |-- es
| | | `-- LC_MESSAGES
| | | `-- sunw_java_plugin.mo
| | |-- fr
| | | `-- LC_MESSAGES
| | | `-- sunw_java_plugin.mo
| | |-- it
| | | `-- LC_MESSAGES
| | | `-- sunw_java_plugin.mo
| | |-- ja
| | | `-- LC_MESSAGES
| | | `-- sunw_java_plugin.mo
| | |-- ko
| | | `-- LC_MESSAGES
| | | `-- sunw_java_plugin.mo
| | |-- ko.UTF-8
| | | `-- LC_MESSAGES
| | | `-- sunw_java_plugin.mo
| | |-- sv
| | | `-- LC_MESSAGES
| | | `-- sunw_java_plugin.mo
| | |-- zh
| | | `-- LC_MESSAGES
| | | `-- sunw_java_plugin.mo
| | |-- zh.GBK
| | | `-- LC_MESSAGES
| | | `-- sunw_java_plugin.mo
| | |-- zh_TW
| | | `-- LC_MESSAGES
| | | `-- sunw_java_plugin.mo
| | `-- zh_TW.BIG5
| | `-- LC_MESSAGES
| | `-- sunw_java_plugin.mo
| |-- logging.properties
| |-- plugin.jar
| |-- psfont.properties.ja
| |-- psfontj2d.properties
| |-- rt.jar
| |-- security
| | |-- US_export_policy.jar
| | |-- cacerts
| | |-- java.policy
| | |-- java.security
| | `-- local_policy.jar
| |-- sunrsasign.jar
| `-- zi
| |-- Africa
| | |-- Abidjan
| | |-- Accra
| | |-- Addis_Ababa
| | |-- Algiers
| | |-- Asmera
| | |-- Bamako
| | |-- Bangui
| | |-- Banjul
| | |-- Bissau
| | |-- Blantyre
| | |-- Brazzaville
| | |-- Bujumbura
| | |-- Cairo
| | |-- Casablanca
| | |-- Ceuta
| | |-- Conakry
| | |-- Dakar
| | |-- Dar_es_Salaam
| | |-- Djibouti
| | |-- Douala
| | |-- El_Aaiun
| | |-- Freetown
| | |-- Gaborone
| | |-- Harare
| | |-- Johannesburg
| | |-- Kampala
| | |-- Khartoum
| | |-- Kigali
| | |-- Kinshasa
| | |-- Lagos
| | |-- Libreville
| | |-- Lome
| | |-- Luanda
| | |-- Lubumbashi
| | |-- Lusaka
| | |-- Malabo
| | |-- Maputo
| | |-- Maseru
| | |-- Mbabane
| | |-- Mogadishu
| | |-- Monrovia
| | |-- Nairobi
| | |-- Ndjamena
| | |-- Niamey
| | |-- Nouakchott
| | |-- Ouagadougou
| | |-- Porto-Novo
| | |-- Sao_Tome
| | |-- Timbuktu
| | |-- Tripoli
| | |-- Tunis
| | `-- Windhoek
| |-- America
| | |-- Adak
| | |-- Anchorage
| | |-- Anguilla
| | |-- Antigua
| | |-- Araguaina
| | |-- Aruba
| | |-- Asuncion
| | |-- Barbados
| | |-- Belem
| | |-- Belize
| | |-- Boa_Vista
| | |-- Bogota
| | |-- Boise
| | |-- Buenos_Aires
| | |-- Cambridge_Bay
| | |-- Cancun
| | |-- Caracas
| | |-- Catamarca
| | |-- Cayenne
| | |-- Cayman
| | |-- Chicago
| | |-- Chihuahua
| | |-- Cordoba
| | |-- Costa_Rica
| | |-- Cuiaba
| | |-- Curacao
| | |-- Danmarkshavn
| | |-- Dawson
| | |-- Dawson_Creek
| | |-- Denver
| | |-- Detroit
| | |-- Dominica
| | |-- Edmonton
| | |-- Eirunepe
| | |-- El_Salvador
| | |-- Fortaleza
| | |-- Glace_Bay
| | |-- Godthab
| | |-- Goose_Bay
| | |-- Grand_Turk
| | |-- Grenada
| | |-- Guadeloupe
| | |-- Guatemala
| | |-- Guayaquil
| | |-- Guyana
| | |-- Halifax
| | |-- Havana
| | |-- Hermosillo
| | |-- Indiana
| | | |-- Knox
| | | |-- Marengo
| | | `-- Vevay
| | |-- Indianapolis
| | |-- Inuvik
| | |-- Iqaluit
| | |-- Jamaica
| | |-- Jujuy
| | |-- Juneau
| | |-- Kentucky
| | | `-- Monticello
| | |-- La_Paz
| | |-- Lima
| | |-- Los_Angeles
| | |-- Louisville
| | |-- Maceio
| | |-- Managua
| | |-- Manaus
| | |-- Martinique
| | |-- Mazatlan
| | |-- Mendoza
| | |-- Menominee
| | |-- Merida
| | |-- Mexico_City
| | |-- Miquelon
| | |-- Monterrey
| | |-- Montevideo
| | |-- Montreal
| | |-- Montserrat
| | |-- Nassau
| | |-- New_York
| | |-- Nipigon
| | |-- Nome
| | |-- Noronha
| | |-- North_Dakota
| | | `-- Center
| | |-- Panama
| | |-- Pangnirtung
| | |-- Paramaribo
| | |-- Phoenix
| | |-- Port-au-Prince
| | |-- Port_of_Spain
| | |-- Porto_Velho
| | |-- Puerto_Rico
| | |-- Rainy_River
| | |-- Rankin_Inlet
| | |-- Recife
| | |-- Regina
| | |-- Rio_Branco
| | |-- Santiago
| | |-- Santo_Domingo
| | |-- Sao_Paulo
| | |-- Scoresbysund
| | |-- St_Johns
| | |-- St_Kitts
| | |-- St_Lucia
| | |-- St_Thomas
| | |-- St_Vincent
| | |-- Swift_Current
| | |-- Tegucigalpa
| | |-- Thule
| | |-- Thunder_Bay
| | |-- Tijuana
| | |-- Tortola
| | |-- Vancouver
| | |-- Whitehorse
| | |-- Winnipeg
| | |-- Yakutat
| | `-- Yellowknife
| |-- Antarctica
| | |-- Casey
| | |-- Davis
| | |-- DumontDUrville
| | |-- Mawson
| | |-- McMurdo
| | |-- Palmer
| | |-- Rothera
| | |-- Syowa
| | `-- Vostok
| |-- Asia
| | |-- Aden
| | |-- Almaty
| | |-- Amman
| | |-- Anadyr
| | |-- Aqtau
| | |-- Aqtobe
| | |-- Ashgabat
| | |-- Baghdad
| | |-- Bahrain
| | |-- Baku
| | |-- Bangkok
| | |-- Beirut
| | |-- Bishkek
| | |-- Brunei
| | |-- Calcutta
| | |-- Choibalsan
| | |-- Chongqing
| | |-- Colombo
| | |-- Damascus
| | |-- Dhaka
| | |-- Dili
| | |-- Dubai
| | |-- Dushanbe
| | |-- Gaza
| | |-- Harbin
| | |-- Hong_Kong
| | |-- Hovd
| | |-- Irkutsk
| | |-- Jakarta
| | |-- Jayapura
| | |-- Jerusalem
| | |-- Kabul
| | |-- Kamchatka
| | |-- Karachi
| | |-- Kashgar
| | |-- Katmandu
| | |-- Krasnoyarsk
| | |-- Kuala_Lumpur
| | |-- Kuching
| | |-- Kuwait
| | |-- Macau
| | |-- Magadan
| | |-- Makassar
| | |-- Manila
| | |-- Muscat
| | |-- Nicosia
| | |-- Novosibirsk
| | |-- Omsk
| | |-- Oral
| | |-- Phnom_Penh
| | |-- Pontianak
| | |-- Pyongyang
| | |-- Qatar
| | |-- Qyzylorda
| | |-- Rangoon
| | |-- Riyadh
| | |-- Riyadh87
| | |-- Riyadh88
| | |-- Riyadh89
| | |-- Saigon
| | |-- Sakhalin
| | |-- Samarkand
| | |-- Seoul
| | |-- Shanghai
| | |-- Singapore
| | |-- Taipei
| | |-- Tashkent
| | |-- Tbilisi
| | |-- Tehran
| | |-- Thimphu
| | |-- Tokyo
| | |-- Ulaanbaatar
| | |-- Urumqi
| | |-- Vientiane
| | |-- Vladivostok
| | |-- Yakutsk
| | |-- Yekaterinburg
| | `-- Yerevan
| |-- Atlantic
| | |-- Azores
| | |-- Bermuda
| | |-- Canary
| | |-- Cape_Verde
| | |-- Faeroe
| | |-- Madeira
| | |-- Reykjavik
| | |-- South_Georgia
| | |-- St_Helena
| | `-- Stanley
| |-- Australia
| | |-- Adelaide
| | |-- Brisbane
| | |-- Broken_Hill
| | |-- Darwin
| | |-- Hobart
| | |-- Lindeman
| | |-- Lord_Howe
| | |-- Melbourne
| | |-- Perth
| | `-- Sydney
| |-- CET
| |-- EET
| |-- Etc
| | |-- GMT
| | |-- GMT+1
| | |-- GMT+10
| | |-- GMT+11
| | |-- GMT+12
| | |-- GMT+2
| | |-- GMT+3
| | |-- GMT+4
| | |-- GMT+5
| | |-- GMT+6
| | |-- GMT+7
| | |-- GMT+8
| | |-- GMT+9
| | |-- GMT-1
| | |-- GMT-10
| | |-- GMT-11
| | |-- GMT-12
| | |-- GMT-13
| | |-- GMT-14
| | |-- GMT-2
| | |-- GMT-3
| | |-- GMT-4
| | |-- GMT-5
| | |-- GMT-6
| | |-- GMT-7
| | |-- GMT-8
| | |-- GMT-9
| | |-- UCT
| | `-- UTC
| |-- Europe
| | |-- Amsterdam
| | |-- Andorra
| | |-- Athens
| | |-- Belfast
| | |-- Belgrade
| | |-- Berlin
| | |-- Brussels
| | |-- Bucharest
| | |-- Budapest
| | |-- Chisinau
| | |-- Copenhagen
| | |-- Dublin
| | |-- Gibraltar
| | |-- Helsinki
| | |-- Istanbul
| | |-- Kaliningrad
| | |-- Kiev
| | |-- Lisbon
| | |-- London
| | |-- Luxembourg
| | |-- Madrid
| | |-- Malta
| | |-- Minsk
| | |-- Monaco
| | |-- Moscow
| | |-- Oslo
| | |-- Paris
| | |-- Prague
| | |-- Riga
| | |-- Rome
| | |-- Samara
| | |-- Simferopol
| | |-- Sofia
| | |-- Stockholm
| | |-- Tallinn
| | |-- Tirane
| | |-- Uzhgorod
| | |-- Vaduz
| | |-- Vienna
| | |-- Vilnius
| | |-- Warsaw
| | |-- Zaporozhye
| | `-- Zurich
| |-- GMT
| |-- Indian
| | |-- Antananarivo
| | |-- Chagos
| | |-- Christmas
| | |-- Cocos
| | |-- Comoro
| | |-- Kerguelen
| | |-- Mahe
| | |-- Maldives
| | |-- Mauritius
| | |-- Mayotte
| | `-- Reunion
| |-- MET
| |-- Pacific
| | |-- Apia
| | |-- Auckland
| | |-- Chatham
| | |-- Easter
| | |-- Efate
| | |-- Enderbury
| | |-- Fakaofo
| | |-- Fiji
| | |-- Funafuti
| | |-- Galapagos
| | |-- Gambier
| | |-- Guadalcanal
| | |-- Guam
| | |-- Honolulu
| | |-- Johnston
| | |-- Kiritimati
| | |-- Kosrae
| | |-- Kwajalein
| | |-- Majuro
| | |-- Marquesas
| | |-- Midway
| | |-- Nauru
| | |-- Niue
| | |-- Norfolk
| | |-- Noumea
| | |-- Pago_Pago
| | |-- Palau
| | |-- Pitcairn
| | |-- Ponape
| | |-- Port_Moresby
| | |-- Rarotonga
| | |-- Saipan
| | |-- Tahiti
| | |-- Tarawa
| | |-- Tongatapu
| | |-- Truk
| | |-- Wake
| | |-- Wallis
| | `-- Yap
| |-- WET
| `-- ZoneInfoMappings
|-- man
| |-- ja -> ja_JP.eucJP
| |-- ja_JP.eucJP
| | `-- man1
| | |-- java.1
| | |-- javaws.1
| | |-- keytool.1
| | |-- kinit.1
| | |-- klist.1
| | |-- ktab.1
| | |-- orbd.1
| | |-- policytool.1
| | |-- rmid.1
| | |-- rmiregistry.1
| | |-- servertool.1
| | `-- tnameserv.1
| `-- man1
| |-- java.1
| |-- javaws.1
| |-- keytool.1
| |-- kinit.1
| |-- klist.1
| |-- ktab.1
| |-- orbd.1
| |-- policytool.1
| |-- rmid.1
| |-- rmiregistry.1
| |-- servertool.1
| `-- tnameserv.1
`-- plugin
|-- desktop
| |-- sun_java.desktop
| `-- sun_java.png
`-- i386
|-- ns4
| `-- libjavaplugin.so
|-- ns610
| `-- libjavaplugin_oji.so
`-- ns610-gcc32
`-- libjavaplugin_oji.so
68 directories, 611 files
抱歉!JAVA_HOME=/usr/java/$JDK_VERSION 这里我漏掉一个 $,现在补上了。 好,顶 抱歉!引入一处错误,现已修正。
页:
[1]