• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

How to compile EJB file

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
weblogic.jar -- which lives in [bea_home]\weblogic81\server\lib
 
I need a new interior decorator. This tiny ad just painted every room in my house purple.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic