我的helloejb,关键问题解决不了,大伙帮看看

06-06-04 zbbsabe
[目标]http://wolfware.blogchina.com/2518615.html 上的一个helloejb

[问题描述]我用的是j2ee 1.4版,附带一个sdk.我的环境变量设置如下

[classpath]d:\j2ee\lib\j2ee.jar

[path]D:\j2ee\jdk\bin;D:\j2ee\bin

[目前状况]编译和执行普通的j2se项目pass.这个helloclient编译通过,但一旦java就出错。相关的jar已经在jboss顺利部署。

[报错信息如下]

C:\Documents and Settings\godpower\桌面\mytask2\sample>java HelloClient.java

Exception in thread "main" java.lang.NoClassDefFoundError: HelloClient/java

[注]即使打java rrrr.java也是报同样的错,(rrrr.java不存在)

小弟忙了很久,终于搞定了jboss,遇到这个问题实在郁闷,希望大家帮我出出主意,不胜感激!!!!!!!!

zbbsabe
2006-06-05 08:49
[补充一下]

[CLATHHPATH]已加

C:\Documents and Settings\godpower\桌面\mytask2\sample

[错误提示]变为

Exception in thread "main" java.lang.NoClassDefFoundError: HelloClient (w

me: sample/HelloClient)

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.

4)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)

at java.net.URLClassLoader.access$100(URLClassLoader.java:56)

at java.net.URLClassLoader$1.run(URLClassLoader.java:195)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)

at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

C:\Documents and Settings\godpower\桌面\mytask2\sample>f:

F:\>f:

F:\>java HelloClient

Exception in thread "main" java.lang.NoClassDefFoundError: HelloClient (w

me: sample/HelloClient)

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.

4)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)

at java.net.URLClassLoader.access$100(URLClassLoader.java:56)

at java.net.URLClassLoader$1.run(URLClassLoader.java:195)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)

at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

猜你喜欢