当前位置: 技术问答>java相关
這個是啥問題?高分求助~~~~~~~~~
来源: 互联网 发布时间:2015-10-30
本文导语: 當我這麼處理的時候,錯誤提示是這樣的/是不是ejb的類庫沒有案專,我下載了,但是不知道 放在那個目錄下?求助!!!! C:HelloWorld>javac *.java RemoteInterface.java:4: ';' expected public String message(String str)throws java.rmi.R...
當我這麼處理的時候,錯誤提示是這樣的/是不是ejb的類庫沒有案專,我下載了,但是不知道
放在那個目錄下?求助!!!!
C:HelloWorld>javac *.java
RemoteInterface.java:4: ';' expected
public String message(String str)throws java.rmi.RemoteException
^
RemoteHome.java:1: package javax.ejb does not exist
public interface RemoteHome extends javax.ejb.EJBHome
^
RemoteInterface.java:2: package javax.ejb does not exist
public interface RemoteInterface extends javax.ejb.EJBObject
^
RemoteHome.java:3: package javax.ejb does not exist
RemoteInterface create()throws java.rmi.RemoteException,javax.ejb.CreateExceptio
n;
^
RemoteObject.java:1: package javax.ejb does not exist
public class RemoteObject implements javax.ejb.SessionBean
^
RemoteObject.java:14: package javax.ejb does not exist
public void setSessionContext(javax.ejb.SessionContext sc) {}
^
6 errors
C:HelloWorld>javac *.java
RemoteInterface.java:4: ';' expected
public String message(String str)throws java.rmi.RemoteException
^
RemoteHome.java:1: package javax.ejb does not exist
public interface RemoteHome extends javax.ejb.EJBHome
^
RemoteInterface.java:2: package javax.ejb does not exist
public interface RemoteInterface extends javax.ejb.EJBObject
^
RemoteHome.java:3: package javax.ejb does not exist
RemoteInterface create()throws java.rmi.RemoteException,javax.ejb.CreateExceptio
n;
^
RemoteObject.java:1: package javax.ejb does not exist
public class RemoteObject implements javax.ejb.SessionBean
^
RemoteObject.java:14: package javax.ejb does not exist
public void setSessionContext(javax.ejb.SessionContext sc) {}
^
6 errors
C:HelloWorld>javac *.java
RemoteInterface.java:4: ';' expected
public String message(String str)throws java.rmi.RemoteException
^
RemoteHome.java:1: package javax.ejb does not exist
public interface RemoteHome extends javax.ejb.EJBHome
^
RemoteInterface.java:2: package javax.ejb does not exist
public interface RemoteInterface extends javax.ejb.EJBObject
^
RemoteHome.java:3: package javax.ejb does not exist
RemoteInterface create()throws java.rmi.RemoteException,javax.ejb.CreateExceptio
n;
^
RemoteObject.java:1: package javax.ejb does not exist
public class RemoteObject implements javax.ejb.SessionBean
^
RemoteObject.java:14: package javax.ejb does not exist
public void setSessionContext(javax.ejb.SessionContext sc) {}
^
6 errors
放在那個目錄下?求助!!!!
C:HelloWorld>javac *.java
RemoteInterface.java:4: ';' expected
public String message(String str)throws java.rmi.RemoteException
^
RemoteHome.java:1: package javax.ejb does not exist
public interface RemoteHome extends javax.ejb.EJBHome
^
RemoteInterface.java:2: package javax.ejb does not exist
public interface RemoteInterface extends javax.ejb.EJBObject
^
RemoteHome.java:3: package javax.ejb does not exist
RemoteInterface create()throws java.rmi.RemoteException,javax.ejb.CreateExceptio
n;
^
RemoteObject.java:1: package javax.ejb does not exist
public class RemoteObject implements javax.ejb.SessionBean
^
RemoteObject.java:14: package javax.ejb does not exist
public void setSessionContext(javax.ejb.SessionContext sc) {}
^
6 errors
C:HelloWorld>javac *.java
RemoteInterface.java:4: ';' expected
public String message(String str)throws java.rmi.RemoteException
^
RemoteHome.java:1: package javax.ejb does not exist
public interface RemoteHome extends javax.ejb.EJBHome
^
RemoteInterface.java:2: package javax.ejb does not exist
public interface RemoteInterface extends javax.ejb.EJBObject
^
RemoteHome.java:3: package javax.ejb does not exist
RemoteInterface create()throws java.rmi.RemoteException,javax.ejb.CreateExceptio
n;
^
RemoteObject.java:1: package javax.ejb does not exist
public class RemoteObject implements javax.ejb.SessionBean
^
RemoteObject.java:14: package javax.ejb does not exist
public void setSessionContext(javax.ejb.SessionContext sc) {}
^
6 errors
C:HelloWorld>javac *.java
RemoteInterface.java:4: ';' expected
public String message(String str)throws java.rmi.RemoteException
^
RemoteHome.java:1: package javax.ejb does not exist
public interface RemoteHome extends javax.ejb.EJBHome
^
RemoteInterface.java:2: package javax.ejb does not exist
public interface RemoteInterface extends javax.ejb.EJBObject
^
RemoteHome.java:3: package javax.ejb does not exist
RemoteInterface create()throws java.rmi.RemoteException,javax.ejb.CreateExceptio
n;
^
RemoteObject.java:1: package javax.ejb does not exist
public class RemoteObject implements javax.ejb.SessionBean
^
RemoteObject.java:14: package javax.ejb does not exist
public void setSessionContext(javax.ejb.SessionContext sc) {}
^
6 errors
|
一是方法
public String message(String str)throws java.rmi.RemoteException
附近有语法错误;二是import 存在错误引入:javax.ejb包在jdk的class中并不存在
public String message(String str)throws java.rmi.RemoteException
附近有语法错误;二是import 存在错误引入:javax.ejb包在jdk的class中并不存在
|
缺少一个包
去下j2ee开发环境吧,默认就有,否则你就去下这个包
去下j2ee开发环境吧,默认就有,否则你就去下这个包
|
把你的mail给我,我发给你
|
RemoteInterface.java:4: ';' expected
public String message(String str)throws java.rmi.RemoteException
另外,这个错误是因为你少了一个引号
public String message(String str)throws java.rmi.RemoteException
另外,这个错误是因为你少了一个引号
|
关注
|
在你的ClassPath 中能找到这个包(j2ee.jar)吗?