package javax.ejb does not exist inspite of jar file in classpath
13,944
I faced the same problem .
You need to add javaee5.jar
to you class path .
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 .
Author by
Asif Shiraz
Updated on June 04, 2022Comments
-
Asif Shiraz almost 2 years
I'm trying to compile a java program using command
javac -d build src/*.java -verbose
It returns me the following:
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 { ^
I'm using jdk1.6.0_35. CLASSPATH contains C:\wls1036_dev\modules\ which contains javax.ejb.jar
What could possibly be the problem?
-
Asif Shiraz over 11 yearsTried both. No luck :( Screen shot of error
-
GreyBeardedGeek over 11 yearslooks like you added it to the 'sourcepath' instead of the 'classpath'
-
alexjosesilva over 6 yearsPode ser adicionado diretamente ao projeto em Bibliotecas!