没有找到main方法,确认是否写了main方法,确认main的语法格式是否完全正确,包含大小写是否正确。
解决方案 »
- java.lang.NoClassDefFoundError: org/hibernate/cfg/AnnotationConfiguration
- 为什么下面的java代码,b的值会是2?
- 问一个变态点的问题,关于html,css,js的
- 求助:struts和extssl的设置问题
- 来者有分!关于struts构架的网站里每个页面的状态验证问题!
- 高分求取用servlet发送和接受xml的例子!高手帮忙
- 初次到CSDN,以后请多关照!
- 用JBuidler9和Weblogic7部署entity bean时出错,请高手帮我解决
- 一个入门的问题,请高手指点,谢了先
- properties文件转码问题
- jbuilder8(非jb7)中为什么保存不了jsp文件?苦恼!
- J2EE规范是什么呀?
package ejbtest;import javax.naming.*;
import javax.rmi.PortableRemoteObject;public class EJBTestTestClient {
private EJBTestHome eJBTestHome = null; //Construct the EJB test client
public EJBTestTestClient() {
try {
//get naming context
Context ctx = new InitialContext(); //look up jndi name
Object ref = ctx.lookup("EJBTest"); //cast to Home interface
eJBTestHome = (EJBTestHome) PortableRemoteObject.narrow(ref, EJBTestHome.class);
}
catch(Exception e) {
e.printStackTrace();
}
} //----------------------------------------------------------------------------
// Utility Methods
//---------------------------------------------------------------------------- public EJBTestHome getHome() {
return eJBTestHome;
}
//Main method public static void main(String[] args) {
try{
EJBTestTestClient client = new EJBTestTestClient();
}catch(Exception e){
System.out.println("\n....\n");
System.exit(1); }
// Use the getHome() method of the client object to call Home interface
// methods that will return a Remote interface reference. Then
// use that Remote interface reference to access the EJB.
}
}几乎都是jbuilder自动生产
tools->config jdk->class->add->xxx.jar
我断点设在main函数那,可是运行它说cann't find main class,program will exit!是怎么回事呢,是不是没有指定。
to : study_body(珍惜每一天)
在jbuilder中需要添加×××.jar吗?是什么jar
jbuilder 默认已经包含了
然后运行看看如何?