|
|

楼主 |
发表于 2007-11-30 00:18:17
|
显示全部楼层
找到点儿相关内容可还要“翻墙”,想解决问题不太容易啊!给出链接和内容,然后继续等Truth的说明档。
http://osmastery.wordpress.com/2 ... under-opensuse-103/
November 27, 2007
JDK 6 under openSUSE 10.3
Filed under: Java, openSUSE — Tags: Java, JDK, Linux, openSUSE — EnRokuta @ 4:30 pm
The current release of openSUSE 10.3 provides RPM packages for Sun’s Java SE Development Kit (JDK) under its non-oss repository. The packages are called java-1_X_0-sun-devel where X referes to the version number. Unfortunately, I could not get those packages to work on my installation of openSUSE. So I have to resolve back to the original self-extracting packages from Sun.
Once downloaded, you need to execute the binary file and agree to the license:
enki@enki-desktop:/media/store/opt> ./jdk-6u3-linux-i586.bin
To let openSUSE know about the new Java installation you need to add JDK’s binary directory to the execution path. Creating a login shell under /etc/profile.d/ would do the job for you. If you do not have root access or do not want other members to be affected, use ~/.profile under your home directory. Go ahead and create a file called java.sh with the following three lines:
export JAVA_HOME=/media/store/opt/jdk1.6.0_03
export PATH=$PATH JAVA_HOME/bin
export MANPATH=$MANPATH JAVA_HOME/man
Now make the file executable:
enki-desktop:/etc/profile.d # chmod +x java.sh
Now you have to logout and login again so that the new java.sh shell gets executed.
nki@enki-desktop:~> which java
/media/store/opt/jdk1.6.0_03/bin/java
enki@enki-desktop:~> javac -version
javac 1.6.0_03
enki@enki-desktop:~> echo $JAVA_HOME
/media/store/opt/jdk1.6.0_03
enki@enki-desktop:~> echo $PATH
/opt/kde3/bin:/home/enki/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:
/media/store/opt/jdk1.6.0_03/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin
As you can see, java and javac commands are now in your path and you have defined JAVA_HOME as well |
|