This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes EJB and other Java EE Technologies and the fly likes getting compiler error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "getting compiler error" Watch "getting compiler error" New topic
Author

getting compiler error

faisal siraj
Greenhorn

Joined: Oct 03, 2005
Posts: 9
Hi i m a beginner in J2ee.When i comiple, i get the following error

C:\j2eetutorial\examples>ant converter
Buildfile: build.xml

init:

converter:
[javac] Compiling 4 source files to C:\j2eetutorial\examples\build\ejb\conve
rter
[javac] C:\j2eetutorial\examples\src\ejb\converter\Converter.java:10: packag
e javax.ejb does not exist
[javac] import javax.ejb.EJBObject;
[javac] ^
[javac] C:\j2eetutorial\examples\src\ejb\converter\Converter.java:14: cannot
resolve symbol
[javac] symbol : class EJBObject
[javac] location: interface Converter
[javac] public interface Converter extends EJBObject {
[javac] ^
[javac] C:\j2eetutorial\examples\src\ejb\converter\ConverterBean.java:11: pa
ckage javax.ejb does not exist
[javac] import javax.ejb.SessionBean;
[javac] ^
[javac] C:\j2eetutorial\examples\src\ejb\converter\ConverterBean.java:12: pa
ckage javax.ejb does not exist
[javac] import javax.ejb.SessionContext;
[javac] ^
[javac] C:\j2eetutorial\examples\src\ejb\converter\ConverterBean.java:15: ca
nnot resolve symbol
[javac] symbol : class SessionBean
[javac] location: class ConverterBean
[javac] public class ConverterBean implements SessionBean {
[javac] ^
[javac] C:\j2eetutorial\examples\src\ejb\converter\ConverterBean.java:37: ca
nnot resolve symbol
[javac] symbol : class SessionContext
[javac] location: class ConverterBean
[javac] public void setSessionContext(SessionContext sc) {}
[javac] ^
[javac] C:\j2eetutorial\examples\src\ejb\converter\ConverterHome.java:12: pa
ckage javax.ejb does not exist
[javac] import javax.ejb.CreateException;
[javac] ^
[javac] C:\j2eetutorial\examples\src\ejb\converter\ConverterHome.java:13: pa
ckage javax.ejb does not exist
[javac] import javax.ejb.EJBHome;
[javac] ^
[javac] C:\j2eetutorial\examples\src\ejb\converter\ConverterHome.java:15: ca
nnot resolve symbol
[javac] symbol : class EJBHome
[javac] location: interface ConverterHome
[javac] public interface ConverterHome extends EJBHome {
[javac] ^
[javac] C:\j2eetutorial\examples\src\ejb\converter\ConverterHome.java:17: ca
nnot resolve symbol
[javac] symbol : class CreateException
[javac] location: interface ConverterHome
[javac] Converter create() throws RemoteException, CreateException;
[javac] ^
[javac] 10 errors

BUILD FAILED

C:\j2eetutorial\examples\build.xml:89: Compile failed, messages should have been
provided.

Total time: 11 seconds
can anybody hel me.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30356
    
150

Faisal,
Check that j2ee.jar is in your classpath and is in that location on your hard drive. The error message indicates that the jar cannot be found.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
 
subject: getting compiler error