Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to compile EJB file  RSS feed

 
Ramesh Shanmugam
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI all,

I just started with EJB. Its very nice to learn EJB.
While progressing through a tutorial i happen to write a small EJB program.
where i have created 4 files. Hello.java, HelloBean.java,HelloLocal.java
HelloLocalHome.java.

I couldnt compile the tow files HelloLocal.java,HelloLocalHome.java where it says it cannot find an Object EJBLocal and EJBLocalHome..

pls guide me how to compile those files.
 
Balamaci Serban
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Did u say
import javax.ejb.EJBLocalHome;
import javax.ejb.EJBLocalObject;
which are part of a something containing j2ee in it's name depending on the app server you use. On Jboss it's jboss-j2ee.jar and in sun app server it's j2ee.jar

to compile you would need to get that class in your classpath
Hope it helps.
Happy codin!
[ March 22, 2005: Message edited by: Balamaci Serban ]
 
Ramesh Shanmugam
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Serban
thanks for your reply.
i am using weblogic 8.1

tell me how i can set the class path
or the pacakage i need to import in my file
 
Balamaci Serban
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. Well I'm no expert myself having started with j2ee not long ago, and weblogic i have not used, actually not used anything else than jboss and sun app server(this for only once). It apears weblogic even has it's own tool to make it easier to modify the classpath.
Well here is how it's generaly done when you need to put a .jar on the classpath.
On windows XP press Start->Settings->ControlPanel
Select the System icon, then the Advanced tab and at the bottom press Enviroment Variables. On the User Variables window you should have a variable named CLASSPATH. Double clk on it and in the Variable Value text box insert at the end(do not delete what it is already there) ";c:\path_to_jar\name.jar" without the quotes.
On Linux you would say
export CLASSPATH=:/usr/path_to_jar/name.jar

Well i'm not really sure what's the name weblogic uses for it's jar containing javax.ejb.*; so any WebLogic guys please HELP.
[ March 22, 2005: Message edited by: Balamaci Serban ]
 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
weblogic.jar -- which lives in [bea_home]\weblogic81\server\lib
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!