当前位置: 技术问答>java相关
关于ejb的小问题?
来源: 互联网 发布时间:2015-07-29
本文导语: D:>javac e:ee*.java e:eeHelloEJB.java:2: '{' expected public class HelloEJB impelements SessionBean{ ^ e:eeHelloEJB.java:9: '}' expected } ^ 2 errors _________________________________________________ import javax.ejb.*; public ...
D:>javac e:ee*.java
e:eeHelloEJB.java:2: '{' expected
public class HelloEJB impelements SessionBean{
^
e:eeHelloEJB.java:9: '}' expected
}
^
2 errors
_________________________________________________
import javax.ejb.*;
public class HelloEJB impelements SessionBean{
public void ejbCreate(){}
public void ejbRemove(){}
public void ejbActivate(){}
public void ejbPassivate(){}
public void set SessionContext(SessionContext ctx){}
public String getHello(){return new String("Hello,EJB");}
}
_____________________________
public interface Hello extends javax.ejb.EJBObject{
public String getHello() throws java.rmi.RemoteException;
}
e:eeHelloEJB.java:2: '{' expected
public class HelloEJB impelements SessionBean{
^
e:eeHelloEJB.java:9: '}' expected
}
^
2 errors
_________________________________________________
import javax.ejb.*;
public class HelloEJB impelements SessionBean{
public void ejbCreate(){}
public void ejbRemove(){}
public void ejbActivate(){}
public void ejbPassivate(){}
public void set SessionContext(SessionContext ctx){}
public String getHello(){return new String("Hello,EJB");}
}
_____________________________
public interface Hello extends javax.ejb.EJBObject{
public String getHello() throws java.rmi.RemoteException;
}
|
impelements -〉implements
set SessionContext -〉setSessionContext
set SessionContext -〉setSessionContext
|
你没有在classpath中引入Oracle的包吧!