|
我在网上下了一个redhat fedora core6,安装成功了,os自动识别了我的声卡和显卡,我也装了一个mplayer能看电影了,也能上网了,有这几个问题搞不明白:
1.我下载 sun公司了 jdk1.6,在命令行下能运行java,javac,写一个小程序,用javac *.java能通过,可是用java 类名 时就出错。
Exception in thread "main" java.lang.NoClassDefFoundError: 1
at gnu.java.lang.MainThread.run(libgcj.so.7rh)
Caused by: java.lang.ClassNotFoundException: 1 not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:/usr/java/jdk1.6.0/lib/dt.jar,file:/usr/java/jdk1.6.0/lib/tools.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at gnu.java.lang.MainThread.run(libgcj.so.7rh)
我的classpath,和path都设置正确了。这是我的set的显示:
BASH=/bin/bash
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="3" [1]="1" [2]="17" [3]="1" [4]="release" [5]="i686-redhat-linux-gnu")
BASH_VERSION='3.1.17(1)-release'
CLASSPATH=.:/usr/java/jdk1.6.0/lib/dt.jar:/usr/java/jdk1.6.0/lib/tools.jar
COLORS=/etc/DIR_COLORS.xterm
COLORTERM=gnome-terminal
COLUMNS=80
CVS_RSH=ssh
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-ARersegXVn,guid=2b360b4622bf0348c261df9198230f00
DESKTOP_SESSION=gnome
DESKTOP_STARTUP_ID=
DIRSTACK=()
DISPLAY=:0.0
EUID=0
GDMSESSION=gnome
GDM_XSERVER_LOCATION=local
GNOME_DESKTOP_SESSION_ID=Default
GNOME_KEYRING_SOCKET=/tmp/keyring-acnQos/socket
GROUPS=()
GTK_IM_MODULE=scim-bridge
GTK_RC_FILES=/etc/gtk/gtkrc:/root/.gtkrc-1.2-gnome2
G_BROKEN_FILENAMES=1
HISTFILE=/root/.bash_history
HISTFILESIZE=1000
HISTSIZE=1000
HOME=/root
HOSTNAME=localhost.localdomain
HOSTTYPE=i686
IFS=$' \t\n'
INPUTRC=/etc/inputrc
JAVA_HOME=/usr/java/jdk1.6.0
LANG=zh_CN.UTF-8
LESSOPEN='|/usr/bin/lesspipe.sh %s'
LINES=24
LOGNAME=root
LS_COLORS='no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01r=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:'
MACHTYPE=i686-redhat-linux-gnu
MAIL=/var/spool/mail/root
MAILCHECK=60
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/java/jdk1.6.0/bin:/root/bin:/usr/java/jdk1.6.0/bin
PIPESTATUS=([0]="0")
PPID=23975
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}{PWD/#$HOME/~}"; echo -ne "\007"'
PS1='[\u@\h \W]\$ '
PS2='> '
PS4='+ '
PWD=/root
QT_IM_MODULE=scim
SESSION_MANAGER=local/localhost.localdomain:/tmp/.ICE-unix/18591
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHLVL=2
SSH_AGENT_PID=19099
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_AUTH_SOCK=/tmp/ssh-lWhgF18591/agent.18591
TERM=xterm
UID=0
USER=root
WINDOWID=58720335
XAUTHORITY=/tmp/.gdmPHBQPT
XMODIFIERS=@im=SCIM
_=CLASSPATH
consoletype=pty
不知道错在哪??? |
|