QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 600|回复: 4

Java问题因为想快点解决所以放在这里了..

[复制链接]
发表于 2005-3-7 23:01:22 | 显示全部楼层 |阅读模式
如果给坛主带来不便,先sorry

我已经设置好环境变量可还是提示如下

[root@localhost ~]# javac HelloWorld.java
libgcj-javac-placeholder.sh

This script is a placeholder for the /usr/bin/javac
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.

jc1: out of memory allocating 1342179073 bytes after a total of 135168 bytes
[root@localhost ~]# java HelloWorld
libgcj-java-placeholder.sh

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.
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
   at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)
   at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)
   at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/l ib/libgcj.so.5.0.0)
   at __libc_start_main (/lib/tls/libc-2.3.3.so)
有点弄不明白第一次在Linux下用..所以想请教..可看了精华贴子么找到解决方法..所以向大家询问下
发表于 2005-3-8 08:42:05 | 显示全部楼层
你安装的j2sdk吧,安装在哪个目录?环境变量如何设置的,贴出来大家学习学习
回复

使用道具 举报

 楼主| 发表于 2005-3-8 15:14:30 | 显示全部楼层
安装在/usr/java/j2sdk1.5.0_01
在/etc/profile文件中添加以下内容
JAVA_HOME=/usr/java/j2sdk1.5.0_01
PATH=$PATH:.:$JAVA_HOME/bin
CLASSPATH=$JAVA_HOME/lib/tools.jar:.:$JAVA_HOME/lib/dt.jar
export JAVA_HOME
export PATH
export CLASSPATH

可还是有问题啊...不知道怎么解决以上问题
回复

使用道具 举报

发表于 2005-3-8 15:34:27 | 显示全部楼层
http://www.linuxfans.org/nuke/modules.php?name=Forums&file=viewtopic&t=105367&highlight=j2sdk
回复

使用道具 举报

 楼主| 发表于 2005-3-8 16:04:39 | 显示全部楼层
以解决西西
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-12 22:06 , Processed in 0.063934 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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