javax.ejb.EJBHome not Found

Hi there,

m new to EJB

i' ve got a prob in compiling a client java file

Errors:

HelloClient.java:22: cannot access javax.ejb.EJBHome

class file for javax.ejb.EJBHome not found

Hello hello=home.create();

^

HelloClient.java:24: cannot access javax.ejb.EJBObject

class file for javax.ejb.EJBObject not found

System.out.println(hello.hello());

^

HelloClient.java:25: cannot find symbol

symbol : method remove()

location: interface TestEJB.Hello

hello.remove();

^

3 errors

this is my client code:

package TestEJB;

import javax.naming.Context;

import javax.naming.InitialContext;

import java .util.Properties;

public class HelloClient

{

public static void main(String args[]) throws Exception

{

Properties prop=System.getProperties();

Context ctx=new InitialContext(prop);

Object obj=ctx.lookup("HelloHome");

HelloHome home=(HelloHome)javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class);

Hello hello=home.create();

System.out.println(hello.hello());

hello.remove();

}

}

******************************************************************************

this is my Home Interface :

package TestEJB;

public interface HelloHome extends javax.ejb.EJBHome

{

public Hello create() throws java.rmi.RemoteException,javax.ejb.CreateException;

}

******************************************************************************

This is my remote:

package TestEJB;

public interface Hello extends javax.ejb.EJBObject

{

public String hello() throws java.rmi.RemoteException;

}

******************************************************************************

This is stateless Session Bean :

package TestEJB;

import javax.ejb.SessionContext;

public class HelloBean implements javax.ejb.SessionBean

{

private SessionContext ctx;

public void ejbCreate()

{

System.out.println("in Ejb Create() Method");

}

public void ejbRemove()

{

System.out.println("in Ejb remove() Method");

}

public void ejbActivate()

{

System.out.println("in Ejb Activate() Method");

}

public void ejbPassivate()

{

System.out.println("in Ejb Passivate() Method");

}

public void setSessionContext(javax.ejb.SessionContext ctx)

{

this.ctx=ctx;

}

public String hello()

{

System.out.println(" In Hello Method");

return "Hello, M New To This World";

}

}

please help me to resove this problem

thanx in advance

...............

[2820 byte] By [Java_Boxera] at [2007-11-27 9:21:55]
# 1
Your client needs the EJB jars in the classpath. It is typically some jar available in the server libraries like j2ee.jar for Sun Application Server, weblogic.jar for Weblogic Server ...
aniseeda at 2007-7-12 22:16:03 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Try to add the follows in your client-side Java codes:import javax.ejb.*;
liaodongyana at 2007-7-12 22:16:03 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
Thanks Dear for your help
Java_Boxera at 2007-7-12 22:16:03 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...