Win a copy of Head First Android this week in the Android forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic