QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1017|回复: 5

linux下java的运行环境怎么配置?

[复制链接]
发表于 2005-5-16 21:10:26 | 显示全部楼层 |阅读模式
我使用redhat linux
jdk路径:/usr/java/j2sdk1.4.2_08
/etc/profile 是这样配置的
# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

pathmunge () {
        if ! echo $PATH | /bin/egrep -q "(^|$1($|" ; then
           if [ "$2" = "after" ] ; then
              PATH=$PATH:$1
           else
              PATH=$1:$PATH
           fi
        fi
}

# Path manipulation
if [ `id -u` = 0 ]; then
        pathmunge /sbin
        pathmunge /usr/sbin
        pathmunge /usr/local/sbin
fi

pathmunge /usr/X11R6/bin after


# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"

HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
    INPUTRC=/etc/inputrc
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
            . $i
    fi
done



unset i
unset pathmunge

# java
JAVA_HOME=/usr/java/j2sdk1.4.2_08

export JAVA_HOME

CLASSPATH=.:/usr/java/j2sdk1.4.2_08/lib:/usr/java/j2sdk1.4.2_08/jre/lib

export CLASSPATH

PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin

export PATH

我在终端中输入java,出这样提示:
This script is a placeholder for the /usr/bin/java
master link required by jpackage.org conventions.  libgcj's
rmiregistry, rmic and jar tools are now slave symlinks to these
masters, and are managed by the alternatives( system.

This change was necessary because the rmiregistry, rmic and jar tools
installed by previous versions of libgcj conflicted with symlinks
installed by jpackage.org JVM packages.
Usage: gij [OPTION] ... CLASS [ARGS] ...
          to invoke CLASS.main, or
       gij -jar [OPTION] ... JARFILE [ARGS] ...
          to execute a jar file
Try `gij --help' for more information.

================================================================
请高人指教,谢谢
发表于 2005-5-16 21:58:04 | 显示全部楼层
This change was necessary because the rmiregistry, rmic and jar tools
installed by previous versions of libgcj conflicted with symlinks
installed by jpackage.org JVM packages.
回复

使用道具 举报

 楼主| 发表于 2005-5-17 09:49:18 | 显示全部楼层
???????????????????????????能解释下不 我已经按是那样做配置的了 怎么还出那问题啊
回复

使用道具 举报

 楼主| 发表于 2005-5-17 09:50:32 | 显示全部楼层
我刚学linux
回复

使用道具 举报

 楼主| 发表于 2005-5-19 17:37:47 | 显示全部楼层
怎么没人解答呢
回复

使用道具 举报

发表于 2005-5-19 17:42:34 | 显示全部楼层
把/usr/bin/java删了或改名。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-6 00:24 , Processed in 0.043667 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表