먼저 archiinux kde에 패키지를 빌드하고 설치 한 다음 sun-java를 설치했습니다. 파일 :은/etc/프로필 #은/etc/프로필jdk에 PATH 변수를 설정할 수 없습니다.
#Set our umask
umask 022
# Set our default path
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
export PATH
# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
for profile in /etc/profile.d/*.sh; do
test -r "$profile" && . "$profile"
done
unset profile
fi
# Source global bash config
if test "$PS1" && test "$BASH" && test -r /etc/bash.bashrc; then
. /etc/bash.bashrc
fi
# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP
# Man is much better than us at figuring this out
unset MANPATH
및 파일 : /etc/profile.d/jdk.sh
export J2SDKDIR=/opt/java
export PATH=$PATH:/opt/java/bin:/opt/java/db/bin
export JAVA_HOME=/opt/java
export DERBY_HOME=/opt/java/db
이 환경 변수는 내 컴퓨터에서 설정하는 방법입니다
내가 이해할 수있는 것은 jdk 경로가 경로 환경 변수에 설정되어야하지만 그렇지 않다는 것입니다. 그러나 $ JAVA_HOME 속성이 올바르게 설정되었습니다. 이 문제에 직면하는 이유는 무엇입니까?
당신의 PATH에/opt/java가 먼저 가야합니다./usr/bin에 설치된 다른 현명한 java가 먼저 사용되어야합니다. – kofemann
@geeky_sh'echo $ PATH'의 결과는 무엇입니까? –
echo $ path /home/absolute/.rvm/gems/ruby1.9.3p0/bin:/home/absolute/.rvm/gems/[email protected]/bin:/home/absolute/.rvm/rubies /ruby1.9.3p0/bin:/home/absolute/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr /bin/core_perl:/home/absolute/.rvm/bin –