Java开发网 |
注册 |
登录 |
帮助 |
搜索 |
排行榜 |
发帖统计
|
您没有登录 |
» Java开发网 » Java EE 综合讨论区
打印话题 寄给朋友 订阅主题 |
作者 | 用javac编译EJB中的home接口,出现错误.. |
momocha
发贴: 98 积分: 10 |
于 2003-07-07 15:03
前两天在贵站上看了一教程,但用javac编译home接口的时侯,出现错误,请指点..我把weblogic.jar加到了classpath中了.... 1.远程接口 package examples; import javax.ejb.*; import java.rmi.RemoteException; public interface Product extends EJBObject { public String getName() throws RemoteException; public void setName(String name) throws RemoteException; public String getDescription() throws RemoteException; public void setDescription(String description) throws RemoteException; public double getBasePrice() throws RemoteException; public void setBasePrice(double price) throws RemoteException; public String getProductID() throws RemoteException; } 2.Home接口 package examples; import javax.ejb.*; import java.rmi.RemoteException; import java.util.Collection; public interface ProductHome extends EJBHome { Product create(String productID, String name, String description, double basePrice) throws CreateException, RemoteException; public Product findByPrimaryKey(String key) throws FinderException, RemoteException; public Collection findByName(String name) throws FinderException, RemoteException; public Collection findByDescription(String description) throws FinderException, RemoteException; public Collection findByBasePrice(double basePrice) throws FinderException, RemoteException; public Collection findExpensiveProducts(double minPrice) throws FinderException, RemoteException; public Collection findCheapProducts(double maxPrice) throws FinderException, RemoteException; public Collection findAllProducts() throws FinderException, RemoteException; } 用 javac -d . ProductHome.java提示如下错误.. ProductHome.java:7: cannot resolve symbol symbol : class Product location: interface examples.ProductHome Product create(String productID, String name, String description, double basePrice) throws CreateException, RemoteException; ^ ProductHome.java:8: cannot resolve symbol symbol : class Product location: interface examples.ProductHome public Product findByPrimaryKey(String key) throws FinderException, Remo teException; ^ 2 errors 我用javac -classpath c:\1\src\examples ProductHome.java其中c:\1\src\examples是远程接口的class目录...出现更多的错误..... 关于女孩子从事软件开发的问题 |
话题树型展开 |
人气 | 标题 | 作者 | 字数 | 发贴时间 |
4168 | 用javac编译EJB中的home接口,出现错误.. | momocha | 2217 | 2003-07-07 15:03 |
2541 | Re:用javac编译EJB中的home接口,出现错误.. | mengzhihai | 13 | 2003-07-08 12:32 |
已读帖子 新的帖子 被删除的帖子 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |