package javax.ejb不存在于classpath中的jar文件 [英] package javax.ejb does not exist inspite of jar file in classpath

查看:1092
本文介绍了package javax.ejb不存在于classpath中的jar文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用命令编译一个java程序

I'm trying to compile a java program using command

javac -d build src/*.java -verbose

它返回以下内容:

src\Currency.java:5: package javax.ejb does not exist
import javax.ejb.*;
^
src\Currency.java:7: cannot find symbol
symbol: class EJBObject
public interface Currency extends EJBObject {
                              ^ 

我使用的是jdk1.6.0_35。
CLASSPATH包含C:\wls1036_dev\modules\其中包含javax.ejb.jar

I'm using jdk1.6.0_35. CLASSPATH contains C:\wls1036_dev\modules\ which contains javax.ejb.jar

可能是什么问题?

推荐答案

我遇到了同样的问题。

I faced the same problem .

您需要向类路径添加 javaee5.jar

You need to add javaee5.jar to you class path .

例如,我导入了一个ejb项目,然后意识到我使用的是一个版本的Netbeans,没有EJB& EAR支持。所以我下载了插件。之后,javaee5.jar出现在C:\Users\sjauhar\AppData\Roaming\NetBeans\7.3.1\modules\ext。添加到我的项目,错误消失了。

For example I imported an ejb project and then realised I was using a version of Netbeans that did not have the EJB & EAR support . So i downloaded the plugin . After doing that the javaee5.jar was present at C:\Users\sjauhar\AppData\Roaming\NetBeans\7.3.1\modules\ext . Added it to my project and the error went away .

这篇关于package javax.ejb不存在于classpath中的jar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆