Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB compilation - import javax.ejb.*; not found.

 
Hemal Shah
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am attempting to compile some EJB's (using the Ant tool). However I get compilation errors regarding the import of javax.ejb.*; - When I attempt to compile I get an error stating that this package (javax.ejb) can't be found! I have jdk1.3.1. Do I need some kind of Enterprise edition or is this package available on jdk1.3.1?
p.s. This is an example of the error I get :
[javac] C:\Individualproject\Jakarta\jakarta-ant-1.3\bin\src\uk\ac\ucl\aivet
ac\session\login\LoginWorkFlowBean.java:6: package javax.ejb does not exist
[javac] import javax.ejb.*;
[javac] ^
[javac] C:\Individualproject\Jakarta\jakarta-ant-1.3\bin\src\uk\ac\ucl\aivet
ac\session\login\LoginWorkFlowBean.java:16: cannot resolve symbol
[javac] symbol : class SessionBean
[javac] location: class uk.ac.ucl.aivetac.session.login.LoginWorkFlowBean
[javac] public class LoginWorkFlowBean implements SessionBean {
[javac] ^
Can anyone help?
Thanks
[This message has been edited by Hemal Shah (edited December 04, 2001).]
 
David Weitzman
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The J2EE libraries do not come bundled with J2SE (the JDK). Whatever EJB server you want to deploy on will have a jar file (or more) you can compile with. You can also download J2EE development tools from http://java.sun.com/
 
Hemal Shah
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!
Does this mean that I have to have the classpath of the EJB server jar file set?
I'm a little confused - The EJB server provides a jar file - how do I get the EJB's to configure with this? Or is setting the classpath simply enough?
Thanks again.
 
Mary Taylor
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was having the same problem on Windows2000. If you open the j2ee.jar with WinZip, you will see the files there. Icluding it in your CLASSPATH should work. I removed 1.2.1 and installed 1.3 and haven't gotten back to the point of compiling anything yet. Let us know if this solves your problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic