为什么提示找不到"main class" [问题点数:0分]

Bbs1
本版专家分:0
结帖率 100%
Bbs5
本版专家分:4632
Bbs1
本版专家分:0
Bbs1
本版专家分:0
Bbs5
本版专家分:4632
Bbs5
本版专家分:4632
Bbs1
本版专家分:0
Bbs1
本版专家分:0
Bbs5
本版专家分:4632
Bbs1
本版专家分:0
Bbs5
本版专家分:3485
Bbs4
本版专家分:1822
Bbs3
本版专家分:990
为什么我不到Class?
老<em>提示</em>这个页面??rnHTTP Status 500 - rnrn--------------------------------------------------------------------------------rnrntype Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnjavax.servlet.ServletException: Wrapper cannot find servlet <em>class</em> mypack.DispatcherServlet or a <em>class</em> it depends onrn org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)rn org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209)rn org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:670)rn org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:517)rn org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:575)rn org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)rn java.lang.Thread.run(Thread.java:534)rnrnrnroot cause rnrnjava.lang.ClassNotFoundException: mypack.DispatcherServletrn org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1365)rn org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1212)rn org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)rn org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209)rn org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:670)rn org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:517)rn org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:575)rn org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)rn java.lang.Thread.run(Thread.java:534)rnrnrnnote The full stack trace of the root cause is available in the Tomcat logs.rnrnrn--------------------------------------------------------------------------------rnrnApache Tomcat/5.0.12
帮我看看怎么不到MAIN CLASS。。。谢谢。。
import java.sql.Connection;rnimport java.sql.DriverManager;rnimport java.sql.ResultSet;rnimport java.sql.SQLException;rnimport java.sql.Statement;rnrnpublic <em>class</em> Test rnrn private String url = "jdbc:db2://localhost:8080;DataBassName=COMDB";rn private String username = "db2admin";rn private String password = "db2admin";rnrn private Connection con;rn private Statement stmt;rn static rn try rn Class.forName("com.ibm.db2.jcc.DB2Driver");rnrn catch (Exception e) rn // TODO Auto-generated catch blockrn System.out.println("DataBassAccess:" + e.getMessage());rn rn rnrn public void createConnection() rn try rn con = DriverManager.getConnection(url, username, password);rn catch (Exception e) rn // TODO Auto-generated catch blockrn System.out.println("DataBassAccess:" + e.getMessage());rn rn rn rnrn public void execQuery(String sqlstr) rn try rn ResultSet rs = stmt.executeQuery(sqlstr);rn while (rs.next()) rn String COMPUTER_TYPE = rs.getString("COMPUTER_TYPE");rn System.out.println(COMPUTER_TYPE);rn rn rs.close();rn stmt.close();rn con.close();rn catch (SQLException e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn rnrn rnrn public static void <em>main</em>(String[] args) rn Test db = new Test();rn db.createConnection();rn String sqlstr = "select * from COMPUTER_BASIC_INFO";rn db.execQuery(sqlstr);rnrn rnrn
错误提示class不到 “sub main
不知道是什么问题,老是出错。
classmain()
大哥们能给我简单介绍一下类与函数的关系吗,我很模糊啊,有时发现函数中包含类,有时却发现类中包含函数啊,甚是糊涂了---谢谢!!!
运行.jar文件,提示cannot find main class
我用的是MyEclipes8.5,没有配置环境变量,运行.jar文件时,<em>提示</em>cannot find <em>main</em> <em>class</em>(程序在MyEclipes中调试是正确的);补充说明:设置了这个:window->preferences->installed JRES->ADD next->directory选JDK安装目录。请问怎么解决这个问题?rn
eclipse编译时提示could not find main class
我用的是jdk6.0+eclipse3.2rn原来是正常的,但是前2天重装了系统后,运行以前正常的java代码时,eclipse弹出错误框could not find <em>main</em> <em>class</em>rn控制台显示rn[color=#FF0000]java.lang.UnsupportedClassVersionError: Bad version number in .<em>class</em> filern at java.lang.ClassLoader.defineClass1(Native Method)rn at java.lang.ClassLoader.defineClass(Unknown Source)rn at java.security.SecureClassLoader.defineClass(Unknown Source)rn at java.net.URLClassLoader.defineClass(Unknown Source)rn at java.net.URLClassLoader.access$100(Unknown Source)rn at java.net.URLClassLoader$1.run(Unknown Source)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at java.lang.ClassLoader.loadClassInternal(Unknown Source)rnException in thread "<em>main</em>" [/color]rnrn请知道的告诉我该怎么解决谢谢rn
jdk提示Could not find the main class
以前接触过一点java,好长时间没有编程了,今天运行HelloWorld居然<em>提示</em>说:Could not find the <em>main</em> <em>class</em>:HelloWorld.rn详细错误信息如下:rnException in thread "<em>main</em>" java.lang.NoClassDefFoundError:HelloWorldrnCaused by: java.lang.ClassNotFoundException:HelloWorldrn at java.net.URLClassLoader$1.run(unknown Source)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at java.lang.ClassLoader.loadClassInternal(Unknown Source)rnCould not find the <em>main</em> <em>class</em>:HelloWorld.Program will exit.rn这是我的代码:rn[code=Java]//文件名:HelloWorld.javarnpublic <em>class</em> HelloWorldrnrn public static void <em>main</em>(String args[])rn //向屏幕上写字符串"HelloWorld!"rn rn System.out.println("HelloWorld!");rn rn [/code]rn这是我的环境变量:rnJAVA_HOME:C:\Program Files\Java\jdk1.6.0_13rnrnClASSPATH:%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib;C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jarrnrnPath:%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;D:\php;D:\php\ext;D:\apache\bin;C:\Program Files\Java\jdk1.6.0_13\bin;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\MinGW\binrnrn我在命令行里直接输入javac和java都正常,请问是什么原因呢?请各位帮忙!!谢谢
不到main
//. SwitchStudy.javarnpublic <em>class</em> SwitchStudy rn rn public static void <em>main</em>(String[] args)rn rnrn switch(5)rn rn case 1: prt("1");rn case 2: prt("2"); rn case 5: prt("5");break;rn default: break;rn rn rnrn rnrnrn static void prt(String str)rn rn System.out.println(str);rn rnrnrn运行报错:rnException in thread "<em>main</em>" java.lang.NoClassDefFoundError: SwitchStudy/<em>class</em>rnCaused by: java.lang.ClassNotFoundException: SwitchStudy.<em>class</em>rn at java.net.URLClassLoader$1.run(Unknown Source)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rnCould not find the <em>main</em> <em>class</em>: SwitchStudy.<em>class</em>. Program will exit.
我的JSP为什么不到CLASS?
我想在JSP中加入JAVA BEAN.我把CLASS文件放到了相应的目录下rn并在startWeblogic.cmd中的<em>class</em>path 进行了设置.rn但是运行这个JSP文件,出现错误.错误是这样的:rnCompilation of 'C:\bea\wlserver6.1\config\mydo<em>main</em>\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\_mtxt.java' failed:rn--------------------------------------------------------------------------------rn C:\bea\wlserver6.1\config\mydo<em>main</em>\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\_mtxt.java:90: cannot resolve symbolrnprobably occurred due to an error in /mtxt.jsp line 3:rnrnrnC:\bea\wlserver6.1\config\mydo<em>main</em>\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\_mtxt.java:91: cannot resolve symbolrnprobably occurred due to an error in /mtxt.jsp line 3:rnrnrnC:\bea\wlserver6.1\config\mydo<em>main</em>\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\_mtxt.java:94: cannot resolve symbolrnprobably occurred due to an error in /mtxt.jsp line 3:rnrnrnC:\bea\wlserver6.1\config\mydo<em>main</em>\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\_mtxt.java:96: cannot resolve symbolrnprobably occurred due to an error in /mtxt.jsp line 3:rnrnrnrn--------------------------------------------------------------------------------rnFull compiler error(s):rnC:\bea\wlserver6.1\config\mydo<em>main</em>\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\_mtxt.java:90: cannot resolve symbolrnsymbol : <em>class</em> MyTest rnlocation: <em>class</em> jsp_servlet._mtxtrn MyTest mtxt = null; //[ /mtxt.jsp; Line: 3]rn ^rnC:\bea\wlserver6.1\config\mydo<em>main</em>\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\_mtxt.java:91: cannot resolve symbolrnsymbol : <em>class</em> MyTest rnlocation: <em>class</em> jsp_servlet._mtxtrn mtxt = (MyTest)pageContext.getAttribute("mtxt"); //[ /mtxt.jsp; Line: 3]rn ^rnC:\bea\wlserver6.1\config\mydo<em>main</em>\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\_mtxt.java:94: cannot resolve symbolrnsymbol : <em>class</em> MyTest rnlocation: <em>class</em> jsp_servlet._mtxtrn mtxt = (MyTest)pageContext.getAttribute("mtxt"); //[ /mtxt.jsp; Line: 3]rn ^rnC:\bea\wlserver6.1\config\mydo<em>main</em>\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\_mtxt.java:96: cannot resolve symbolrnsymbol : <em>class</em> MyTest rnlocation: <em>class</em> jsp_servlet._mtxtrn mtxt = new MyTest(); //[ /mtxt.jsp; Line: 3]rn ^rnrn
求助 applet为什么不到class
呵呵 先声明,问一个问题大家不要嘲笑,因为我刚刚开始看java。rn我编写了一个applet,并创建了一个显示它的web页,在我的电脑上运行一切正常。但是我在另一台机器上打开时,却说<em>找</em><em>不到</em><em>class</em>。当然,我已经把web页和<em>class</em>都复制过去了,并且也装了java plug in。什么原因啊,哪位不吝指点一下。谢谢rnrn
为什么不到class?我头大了
我在c:\bbs目录下有个一index.jsp文件rn调用了一个javaBean,rn这个javaBean的<em>class</em>: bbsboard.<em>class</em> 就放在c:\bbs\test中rn我在index.jsp中这样引用他:rn可是运行这个index.jsp的时候总说:rnjava.lang.NoClassDefFoundError: test/bbsboardrnrn我也把他打成一个test.jar文件放在了c:\bbs目录上rn可是还是这个错误!rnrn我也把这个目录加到了<em>class</em>path中(c:\bbs\test\;c:\bbs\test.jar)rnrn我不知道怎么办了.头都大了
为什么提示不到源文件?
在创建关于包的一个实例时,遇到一个问题,说是<em>找</em><em>不到</em>源文件。rn具体情况:rn源文件Calculate.java放在c:\javaeg;rnjavac文件在c:\j2sdk1.4.2\bin;rn我写的命令如下:rnc:\>javaeg>c:\j2sdk1.4.2\bin\javac -d Calculate.javarn回车之后,<em>提示</em>:rnjavac:no source filern但是我运行别的文件可以,为什么只要是运行关于包的文件时就出现这个错误?
不到">为什么提示“stdafx.h"不到
#include "stdafx.h"rnint <em>main</em> (int argc,char* argv[])rnrnputchar('C');rnpuchar('+');rnputchar(43);rnputchar('\n');rnputchar('\n');rnreturn 0;rnrnrn用vc6编译,<em>提示</em><em>找</em><em>不到</em>stdafx.h。而且putchar()未定义。初学者,请赐教。这是个控制台程序
为什么提示不到类定义?
#include "Arc.h"rn#if !defined(AFX_REQUEST_H__466C9BBD_4094_4DC9_8767_8C8710C770A9__INCLUDED_)rn#define AFX_REQUEST_H__466C9BBD_4094_4DC9_8767_8C8710C770A9__INCLUDED_rnrn#if _MSC_VER > 1000rn#pragma oncern#endif // _MSC_VER > 1000rnrn<em>class</em> CRequest : public CArcrnrnprivate:rn CArc* m_pShortestPath;rnrnrn编译时候总是<em>提示</em>rnd:\例子\sdimulviewb\request.h(21) : error C2504: 'CArc' : base <em>class</em> undefinedrnd:\例子\sdimulviewb\request.h(25) : error C2143: syntax error : missing ';' before '*'rn为什么呢?望指教rn
为什么提示不到类?
以下是在JBX中的一个JSPrnrnrnrnrn rnexecuternrnrnrnrnrnrnrnrnrn rnJBuilder Generated JSPrnrn rn rnrnrn userbean rnEnter new value for userbean.password : rnValue of userbean.password is : rnEnter new value for userbean.userID : rnValue of userbean.userID is : rnEnter new value for userbean.userName : rnValue of userbean.userName is : rn rnrnrnrnrnrn为什么编译时总提出以下错误?请指教rnrn"Execute.jsp": Error #: 300 : <em>class</em> Connection not found in <em>class</em> Execute_0002ejsp_jsp at line 13rn"Execute.jsp": Error #: 302 : cannot access <em>class</em> DSBean; <em>class</em> file: DSBean contains wrong <em>class</em>: loginpro.DSBean at line 13rn"Execute.jsp": Error #: 300 : <em>class</em> PreparedStatement not found in <em>class</em> Execute_0002ejsp_jsp at line 15rn"Execute.jsp": Error #: 300 : variable userBean not found in <em>class</em> Execute_0002ejsp_jsp at line 16rn"Execute.jsp": Error #: 300 : variable userBean not found in <em>class</em> Execute_0002ejsp_jsp at line 17rn"Execute.jsp": Error #: 300 : <em>class</em> ResultSet not found in <em>class</em> Execute_0002ejsp_jsp at line 18rnrn
为什么提示windows.h不到
代码如下: rn// SQL2HTML.cpp : Defines the entry point for the console application.rn//rn#include "stdafx.h"rn#include "windows.h"rn#include rnrn错误<em>提示</em>:rn------ Build started: Project: SQL2HTML, Configuration: Debug Win32 ------rnCompiling...rnSQL2HTML.cpprnc:\documents and settings\wz\my documents\visual studio 2005\projects\sql2html\sql2html\sql2html.cpp(4) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directoryrnBuild log was saved at "file://c:\Documents and Settings\wz\My Documents\Visual Studio 2005\Projects\SQL2HTML\SQL2HTML\Debug\BuildLog.htm"rnSQL2HTML - 1 error(s), 0 warning(s)rn========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
为什么提示不到System.Data.ADO?
用.net 建个C#项目,using System.Data.ADO的时候<em>提示</em>没这个ado,怎么回事?
为什么提示不到对象?
var xmldom=xmlHttp.responseXML;rnvar channel=xmldom.documentElement.childNodes.item(0);rn我要是用 var xmldom=xmlHttp.responseText;就能取到数据,为什么取不出xml数据呢
为什么不到提示 d.start()???
<em>class</em> demo extends Threadrnrnpublic void run()rnrnfor(int i=0;i+x);rnrn
提示在类中不到 main 方法!!!!
代码如下: <em>class</em> AreaAndLengthn double sideA,sideB,sideC,area,length;n boolean b;n public AreaAndLength(double a,double b,double c)n sideA=a;n sideB=b;n sideC=c;n if(a+b>c)n n this.b=true;n n elsen this.b=false;n nn double getLength()n return sideA+sideB+sideC;n n public double getArea()n if(b)n double p=(sideA+sideB+sideC)/2.0;n area=Math.sqrt(p*(p-sideA)*(p-sideB)*(p-sideC));n return area;n n elsen System.out.println("不是一个三角形,不能计算面积");n return 0;n n n n<em>class</em> Rectanglen double width,height,area;n Rectangle(double w,double h)n width=w;n height=h;n n double getLength()n return (width+height)*2;n n double getArea()n return width*height;n nn<em>class</em> Circlen double radius,area;n Circle(double r)n radius=r;n n double getLength()n return 6.18*radius;n n double getArea()n return 3.14*radius*radius;n nn<em>class</em> AreaAndLengthn double length,area;n Circle circle=null;n AreaAndLength trangle=null;n Rectangle rectangle=null;n Circle cicle=new Circle(6.0);n AreaAndLength trangle=new AreaAndLength(3.0,2.0,2.0);n Rectangle rectangle=new Rectangle(3.0,5.0);n public static void <em>main</em>(String[] args) n length=circle.getLength();n System.out.println("圆的周长:"+length);n area=circle.getArea();n System.out.println("圆的面积:"+area);n length=trangle.getLength();n System.out.println("三角形的周长:"+length);n area=trangle.getArea();n System.out.println("三角形的面积:"+area);n area=rectangle.getArea();n System.out.println("矩形的面积:"+area);n length=rectangle.getLength();n System.out.println("矩形的周长:"+length);n n
初学者的问题,为什么运行是老提示不到class
<em>class</em>path:c:\jdk1.3\bin\tools.jar;C:\jdk1.3\lib\dt.jarrn服务器:tomcatrntest.Java:rnpackage test;rn………………rn整个程序我放在rnC:\tomcat\webapps\ROOT\WEB-INFrn下,rn<em>class</em>放在rnC:\tomcat\webapps\ROOT\WEB-INF\testrn下,rntest.Java已经编译生成了test.<em>class</em>,我应该怎么样放置<em>class</em>目录才能在jsp文件中正确的调用它们呢???rn谢谢!
请为什么网页上老是提示class不到
我把applet编译后,放在网页中运行,可他总<em>提示</em>说某些类<em>找</em><em>不到</em>?,怎么回事?我该怎么做呀?
为什么总提示class not found?
把所有的javaBean都放在<em>class</em>es目录下,并把<em>class</em>es的绝对路径(f:\nhcy\<em>class</em>es)设置到<em>class</em>path里,但还是<em>提示</em><em>class</em> not found!
could not find the main class
我开始学java,按照教材写一个hello world程序,程序是一模一样的,肯定没有问题,在eclipse里面都可以正常运行,但是在CMD里面可以编译,运行就报错了,不能贴图啊!!rnrn
could not find main class?
我是JAVA的初学者。遇到个问题我不知道怎么处理rn我建立一个new file。输入如下代码测试:rn<em>class</em> aarnrn public static void <em>main</em>(String args[])rn rn System.out.print("fjdslfjsd");rn rnrnrn运行的时候出现这样的对话框:could not find <em>main</em> <em>class</em>,program will exitrn在message里:rnjava.lang.NoClassDefFoundError: aarnException in thread "<em>main</em>" rnrnrn我是个初学者,我叫一个同学来帮我看,但是还是没有办法解决。rn我自己根本没有办法解决,看不懂很多英文的东西。有哪位高人帮我看看吗?rn不知道是不是一些设置出现了问题,可是我没有碰过什么设置。昨天早上都没有问题,到了下午就出现这样的问题了。谢谢大家帮我看看
Counld not find the main class
我新建立的web工程,选择run as ... java application,rn之后选择确定rn为什么总是<em>提示</em> : rnrnjava virtual machine launcherrnCounld not find the <em>main</em> <em>class</em>. Program will exit.rnrn到底什么原因?
main class问题
rnjava.lang.NoClassDefFoundError: org/apache/catalina/startup/BootstraprnException in thread "<em>main</em>" rnrn请问Main <em>class</em>是那个类呀。是不是需要import来什么东西啊,如果是的话,该怎么引进来呢?
Could not find the main class
在Myeclipse 8.5中用外带的tomcat时候,会因为JDK版本的问题出现Could not find the <em>main</em> <em>class</em>,按照上述文档的步骤就可以解决,我亲自体验过
jBuilder 2006第一次运行为什么不到main
jBuilder 2006第一次运行为什么<em>找</em><em>不到</em><em>main</em>,是不是要配置一下,该如何用呢,请指教,谢谢!
Applet 程序中总提示不到class
我首先编译了 KO.<em>class</em> 的java applet程序。然后写了如下代码调用:rnrnrnrn然后保存为 K.html,与K.<em>class</em> 在相同的目录下。运行K.html却总<em>提示</em>:rnload: <em>class</em> KO not found.请教原因?谢谢。
提示不到class,不知代码哪里错了
类已经放到对应目录下,tomcat也重启了,显示<em>找</em><em>不到</em>类,不知道在jsp里包含的时候哪里错了rnjsp代码如下rn[code=HTML]rnrn rnrnrn rn 输入文件的扩展名: rnrnrn rn rnrn 当前JSP页面所在目录中,扩展名是:rnrn文件有:rn);rn FileName file_jsp=new FileName(extendsName);rn String file_name[]=dir.list(file_jsp);rn return file_name;rn rnrn[/code]rn
为什么提示不到输出表呀?
各位大哥,我在用jbuilder6.0编写jdbc程序时,已经加载了jdbc.odbc.JdbcOdbcDriver,可为什么说<em>找</em><em>不到</em>输出表呀,是不是jbuilder6.0还需要另外的配置呀,还请各位帮忙呀,另外,我已经在程序中加入了java.sql.*了。
System.Drawing为什么它提示不到??
如题!rn好是郁闷~~~
求助!!为什么提示不到Enable3dControlsStatic()????
我想在一个win32 的工程里使用MFC,工程设置里面已经设置为Use MFC in a Static Library了,头文件也包含了.可是总<em>提示</em>rnerror C2065: 'Enable3dControlsStatic' : undeclared identifierrn
为什么提示不到文件?
我建了一个虚拟目录practice,并在practice根目录里面建了一个number.txt文件rn以下是代码:rnrnrn Untitled Documentrn rnrnrnrnrnrnrnrn<em>提示</em>错误说:rnMicrosoft VBScript 运行时错误 错误 '800a0035' rnrn文件未<em>找</em>到 rnrn/practice/TMP7zcb9niq89.asp, 行11 rnrnrn
为什么会提示不到标识符。。。。
// 4.8Dlg.cpp : 实现文件rn//rnrn#include "stdafx.h"rn#include "4.8.h"rn#include "4.8Dlg.h"rnrn#ifdef _DEBUGrn#define new DEBUG_NEWrn#endifrnrnrn CString sData2 ; //_T("播放中"); //当前状态rn CString sData3=_T("阿凡达"); //影片名字rn CString sData4=_T("10 g"); //影片大小rn CString sData5=_T("00:11:22 / 01:05:45"); //当前时间rnrn//void Sendto_udp();rnrnrnrn// CMy48Dlg 对话框rn// CString sData2 ; //_T("播放中"); //当前状态rn// CString sData3=_T("阿凡达"); //影片名字rn// CString sData4=_T("10 g"); //影片大小rn// CString sData5=_T("00:11:22 / 01:05:45"); //当前时间rnrnrnrnCMy48Dlg::CMy48Dlg(CWnd* pParent /*=NULL*/)rn : CDialog(CMy48Dlg::IDD, pParent)rnrn m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);rnrnrnvoid CMy48Dlg::DoDataExchange(CDataExchange* pDX)rnrn CDialog::DoDataExchange(pDX);rnrnrnBEGIN_MESSAGE_MAP(CMy48Dlg, CDialog)rn ON_WM_PAINT()rn ON_WM_QUERYDRAGICON()rn //AFX_MSG_MAPrn ON_EN_CHANGE(IDC_EDIT2, &CMy48Dlg::OnEnChangeEdit2)rnEND_MESSAGE_MAP()rnrnrn// CMy48Dlg 消息处理程序rnrnBOOL CMy48Dlg::OnInitDialog()rnrn CDialog::OnInitDialog();rnrn // 设置此对话框的图标。当应用程序主窗口不是对话框时,框架将自动rn // 执行此操作rn SetIcon(m_hIcon, TRUE); // 设置大图标rn SetIcon(m_hIcon, FALSE); // 设置小图标rnrn // TODO: 在此添加额外的初始化代码rn rnrnrnrnrn Sendto_udp();rn //CString sData2=_T("播放中");rn //当前状态rn GetDlgItem(IDC_EDIT2)->SetWindowText(sData2);rnrn //CString sData3=_T("阿凡达");rn //影片名字rn GetDlgItem(IDC_EDIT3)->SetWindowText(sData3);rnrn //CString sData4=_T("10 g");rn //影片大小rn GetDlgItem(IDC_EDIT4)->SetWindowText(sData4);rnrn //CString sData5=_T("00:11:22 / 01:05:45");rn //当前时间rn GetDlgItem(IDC_EDIT5)->SetWindowText(sData5);rnrnrnrnrnrnrn return TRUE; // 除非将焦点设置到控件,否则返回 TRUErnrnrn// 如果向对话框添加最小化按钮,则需要下面的代码rn// 来绘制该图标。对于使用文档/视图模型的 MFC 应用程序,rn// 这将由框架自动完成。rnrnvoid CMy48Dlg::OnPaint()rnrn if (IsIconic())rn rn CPaintDC dc(this); // 用于绘制的设备上下文rnrn SendMessage(WM_ICONERASEBKGND, reinterpret_cast(dc.GetSafeHdc()), 0);rnrn // 使图标在工作区矩形中居中rn int cxIcon = GetSystemMetrics(SM_CXICON);rn int cyIcon = GetSystemMetrics(SM_CYICON);rn CRect rect;rn GetClientRect(&rect);rn int x = (rect.Width() - cxIcon + 1) / 2;rn int y = (rect.Height() - cyIcon + 1) / 2;rnrn // 绘制图标rn dc.DrawIcon(x, y, m_hIcon);rn rn elsern rn CDialog::OnPaint();rn rnrnrn//当用户拖动最小化窗口时系统调用此函数取得光标rn//显示。rnHCURSOR CMy48Dlg::OnQueryDragIcon()rnrn return static_cast(m_hIcon);rnrnrnrnvoid CMy48Dlg::OnEnChangeEdit2()rnrn // TODO: 如果该控件是 RICHEDIT 控件,则它将不会rn // 发送该通知,除非重写 CDialog::OnInitDialog()rn // 函数并调用 CRichEditCtrl().SetEventMask(),rn // 同时将 ENM_CHANGE 标志“或”运算到掩码中。rnrn // TODO: 在此添加控件通知处理程序代码rnrnrnrnvoid CMy48App::Sendto_udp()rnrn int s;rn int fromlen;rn char socket_msg[256];rnrn struct sockaddr_in addr; rn fromlen=sizeof(struct sockaddr);rnrn s = socket(AF_INET, SOCK_DGRAM, 0); //创建一个socket rnrn addr.sin_family = AF_INET;//使用TCP/IP协议rn addr.sin_port = htons(8080);rn addr.sin_addr.s_addr = htonl(INADDR_ANY);rn rnrn memset(socket_msg, 0, sizeof(socket_msg));rnrn recvfrom(s, socket_msg, sizeof(socket_msg), 0, (struct sockaddr *)&addr, &fromlen);rn sData2=socket_msg;rn rnrnrnrnvoid CMy48App::Sendto_udp()这个是在4.8.h这个文件中声明的rn// 4.8.h : PROJECT_NAME 应用程序的主头文件rn//rnrn#pragma oncernrn#ifndef __AFXWIN_H__rn #error "在包含此文件之前包含“stdafx.h”以生成 PCH 文件"rn#endifrnrn#include "resource.h" // 主符号rnrnrn// CMy48App:rn// 有关此类的实现,请参阅 4.8.cpprn//rnrn<em>class</em> CMy48App : public CWinApprnrnpublic:rn CMy48App();rnrn// 重写rn public:rn virtual BOOL InitInstance();rnrn// 实现rnrn DECLARE_MESSAGE_MAP()rnrn public:rn void Sendto_udp();rn;rnrnextern CMy48App theApp;rn
delphi为什么提示不到vnsapi32.dll
在打开delphi的窗体是,<em>提示</em><em>找</em><em>不到</em>vnsapi32.dll,这是什么原因呢? 这个文件是干什么用的呢?在线等待!rn
为什么总是提示不到参数?
为什么总是<em>提示</em><em>找</em><em>不到</em>参数chiNam,是不是我的格式错了?rnrncontainer->ADOQuery2->Close();rncontainer->ADOQuery2->SQL->Clear();rncontainer->ADOQuery2->SQL->Add("select * from reserveRestDays where theMonth=:monthValue and chiNam like'%:chiNam%'");rncontainer->ADOQuery2->Parameters->ParamByName("monthValue")->Value=monthValue;rncontainer->ADOQuery2->Parameters->ParamByName("chiNam")->Value=chiNam;rn container->ADOQuery2->Open();
为什么老是提示不到包含文件
#includern#includern#includernvoid <em>main</em>()rnrnint n;rnchar *p;rnp=(char*)malloc(10*sizeof(char));rnprintf("请输入一串字符串:");rnscanf("%s",p);rnn=strlen(p);rnprintf("%d",n);rnif(n>9)rn rn printf("\n",n);rn p=(char*)realloc(p,sizeof(char)); rn rn rnrn free(p);rnrnrn我的环境是xp+turboC2
为什么一提示不到服务器???
当我打入:http://127.0.0.1:8080时说服务器<em>找</em><em>不到</em>rnrn我同时把以编译好的test.jsp文件放到webapps目录下的一个新建文件夹test中,rn然后输入http://127.0.0.1:8080/test/test.jsp得到的是一样没有<em>找</em>到服务器rnrn我具体路径如下:rnCLASSPATH为以下:rn.;C:\j2sdk1.4.2_04\lib\dt.jar;C:\j2sdk1.4.2_04\lib\tools.jar;C:\tomcat-4.0\jakarta-tomcat-4.1.30;C:\tomcat-4.0\jakarta-tomcat-4.1.30;C:\j2sdk1.4.2_04\lib\msbase.jar;C:\j2sdk1.4.2_04\lib\mssqlserver.jar;C:\j2sdk1.4.2_04\lib\msutil.jar;C:\tomcat-5.5.2\jakarta-tomcat-5.5.2\binrnrnrnJAVA_HOME为以下:rnrnC:\j2sdk1.4.2_04rnrnTOMCAI_HOME为以下:rnrnC:\tomcat-5.5.2\jakarta-tomcat-5.5.2rn
为什么案例提示不到数据库?
我在网上<em>找</em>了个例子,但就报错rnrn用户'sa'登录失败。原因:未与SQL SERVER 连接相关联。rnrn是ADODC1<em>提示</em>的。。。。。
为什么提示不到adovbs.inc呢?
为什么<em>提示</em><em>找</em><em>不到</em>adovbs.inc呢?我搜索能够<em>找</em>到的啊!
为什么总提示不到存储过程?
当我调用MSSql写的含参数的存储过程时;rn调用的方法采用网上流传的第二种方法:rn方法如下:rn SqlDataAdapter da = new SqlDataAdapter("selecProj", conn);rn da.SelectCommand.Connection = conn;rn da.SelectCommand.CommandText = "selecProj ('12345678')";rn da.SelectCommand.CommandType = CommandType.StoredProcedure;rn其中:rn selecProj为存储过程名;('12345678')为传入的参数rn可是执行时候总是<em>提示</em>:<em>找</em><em>不到</em>存储过程:"selecProj ('12345678')"rn请问为什么啊?
为什么总是提示不到System.Data.Sql
在把.vb文件封装成.dll文件的时候,总是<em>提示</em><em>找</em><em>不到</em>System.Data.Sqlrn然后也<em>提示</em>SqlCommand等等全部为未定义类型?rnrn
疑惑:为什么提示不到动态链接库??????
我修改注册表,创建了IE的工具栏按钮,打开IE时,按钮都有了,点击后打开了我的程序,可是<em>提示</em>:“运行时错误“48”,<em>找</em><em>不到</em>XXXX.DLL文件”,但是我在该目录下运行该程序是完全正常的,为什么?疑惑ing。rn我的系统是XP。rn参照例子:http://tech.sina.com.cn/c/2002-11-27/16763.html
以下为什么提示不到符号
import java.util.*;rnrnpublic <em>class</em> lianxi9rnrn public static void <em>main</em>(String[] args)rn rn Collection c1 = new ArrayList();rn Collection c2 = new HashSet();rn Random random = new Random();rn for(int i =0;i<5;i++)rn rn System.out.println(c1.get(i));//此处报错rn System.out.println(c2.get(i));//此处报错rn rnrn rn
为什么会提示不到存储过程?
if exists(select * from sysobjects where name='testTrigger' and xtype='tr')rn drop trigger testTriggerrngornrncreate trigger testTriggerrnon testrnfor deleternasrn declare @tblname varchar(50)rn set @tblname = 'deleted'rn declare @sql varchar(1000)rn set @sql = 'select * from ' + @tblname + ' 'rn exec @sqlrn print '显示的表为'+ @tblNamerngorndelete from testrnrn执行时<em>提示</em>:rn未能<em>找</em>到存储过程'select * form deleted'rn语句已终止rn为什么会这样?
运行时提示不到参数为什么?
如下语句,运行时<em>提示</em>:<em>找</em><em>不到</em>参数:paymonth,为什么?(数据库为Sqlser)rnADOQueryinputoutput->SQL->Add("UPDATE TEMPPAYREC SET PAYMONTH =:paymonth ");rn if (month==12)rn rn ADOQueryinputoutput->Parameters->ParamByName(":paymonth")->Value = StrToDate(IntToStr(year+1)+"-1-1");rn rn elsern rn ADOQueryinputoutput->Parameters->ParamByName(":PAYMONTHVALUE")- >Value = StrToDate(IntToStr(year)+"-"+IntToStr(month+1)+"-1");rn rn
为什么提示不到符号啊
public <em>class</em> CountLitterInArrayrn public static void <em>main</em>(String [] args)rn char [] chars=createArray(); rn System.out.println("The lowercase letter are:");rn displayArray(chars);rn rn public static char[]createArray()rn char [] chars = new char [100];rn for(int i=0;i
怎么在别的CLASS拿到MAIN CLASS数据
两个<em>class</em>,分别a跟brnA是<em>main</em>, 里面创建了一个vector, 怎么才能把vector size送到<em>class</em> B那里?rnrnrnrnpublic <em>class</em> Arnpublic void static <em>main</em> (String[] args)rnrnVector abc = new Vector();rnrnint i = abc.size();rnrnrnrnrnrnpublic <em>class</em> Brnprivate Integer Size;rnpublic Integer getSize()rnreturn this.Size;rnrnprotected void setSize(Integer Size)rnthis.Size = Size;rnrnrnpublic void print()rnSystem.out.print("The size is " + this.Size);rnrn
main" java.lang.NoClassDefFoundError:">新手 为什么提示 Exception in thread "main" java.lang.NoClassDefFoundError:
import java.util.Random;rnpublic <em>class</em> shuijirnrn public static void <em>main</em>(String[] args) rn rn while(true)rn rn Shuiji SJ=new Shuiji();rn new Shuiji().start(); rn rn rnrnrn<em>class</em> Shuiji extends Threadrnrn public void run()rn rnrn int[] randoms = 0,1; rn Random rnd = new Random(); rn int x = 0; rn //int count = 0; rn while(true) rn rn x = rnd.nextInt(2); rn //if(randoms[x] != -1) rn // rn //return randoms[x]; rn System.out.print(randoms[x]);rn //tryThread.sleep(500);catch(Exception e)e.getLocalizedMessage();rn rn //randoms[x] = -1; rn //count++; rn // rn rn rnrnrn这个程序 编译通过了 为什么运行的时候说Exception in thread "<em>main</em>" java.lang.NoClassDefFoundError:rn我其他的程序都可以运行的啊 请教啊这是为什么啊???????
不到方法错误main
Exception in thread "<em>main</em>" java.lang.NoSuchMethodError: <em>main</em>rnrn是什么原因呢rnrnrnpublic <em>class</em> Testrn rn rnpublic void <em>main</em>(String argv[])rnrn rnrn rn rn rnrnrn我的环境变量是%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;D:\ProgramFiles\J2SE\bin;D:\ProgramFiles\UltraEdit;D:\ProgramFiles\MySQL\bin
新手 不到 main 方法
我跟着视频教程一样的编辑的,为什么报错了。。。npackage com.imooc1;nnpublic <em>class</em> Demo npublic static void <em>main</em>(String[] args) n int score = 53; n int i=1;int j;n for( j=0;score+i>=60;j++)n n System.out.println(score);n System.out.println("60"+j);n nn报错:错误: 在类 com.imooc1.Demo 中<em>找</em><em>不到</em> <em>main</em> 方法, 请将 <em>main</em> 方法定义为:n public static void <em>main</em>(String[] args)n否则 JavaFX 应用程序类必须扩展javafx.application.Applicationn
jb6的main class 设置,怎么不到我创建类?
用jb6的时候,一个工程应该要指定一个主程序.rn我的程序编译通过,但运行是<em>提示</em>:Project Priorety的run/dubegrn在<em>main</em> <em>class</em> 中我<em>找</em><em>不到</em>自己的类(只看到系统的类),为什么呢?rnVM Paramters:() 和rnApplication Paramters:()rn这两项的参数怎么添???rn刚用jb,请关注!rn rn rn
jbuilder2006不到 main class怎么处理 急急急
manssage出现如下内容:rnjava.lang.NoClassDefFoundError: ChapterTwelfth Exception in thread "<em>main</em>" rn其中ChapterTwilfth为文件名rn还弹出框,内容如下:Dailog:could not find <em>main</em> <em>class</em> ,Program wil exit.rn(本人用命令<em>提示</em>行测试程序没问题)
installanywhere制作安装程序的问题!不到main class?急!多指教!
rn出现以下的<em>提示</em>?怎么办?rnjava.lang.UnsupportedClassVersionError: net/vtong/h2s/cilent/Application (Unsupported major.minor version 48.0)rnrn at java.lang.ClassLoader.defineClass0(Native Method)rnrn at java.lang.ClassLoader.defineClass(Unknown Source)rnrn at java.security.SecureClassLoader.defineClass(Unknown Source)rnrn at java.net.URLClassLoader.defineClass(Unknown Source)rnrn at java.net.URLClassLoader.access$100(Unknown Source)rnrn at java.net.URLClassLoader$1.run(Unknown Source)rnrn at java.security.AccessController.doPrivileged(Native Method)rnrn at java.net.URLClassLoader.findClass(Unknown Source)rnrn at java.lang.ClassLoader.loadClass(Unknown Source)rnrn at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)rnrn at java.lang.ClassLoader.loadClass(Unknown Source)rnrn at java.lang.ClassLoader.loadClassInternal(Unknown Source)rnrn at java.lang.Class.forName0(Native Method)rnrn at java.lang.Class.forName(Unknown Source)rnrn at com.zerog.lax.LAX.launch(DashoA8113)rnrn at com.zerog.lax.LAX.<em>main</em>(DashoA8113)rnrn
不到或无法加载主类(Could not find or load main class
当我们试图在命令行编译运行一个简单的java程序HelloWorld.java,编译命令javac HelloWorld.java顺利通过,但是执行运行java HelloWorld却报出:“错误:<em>找</em><em>不到</em>或无法加载主类 xxx(Error: Could not find or load <em>main</em> <em>class</em> )”,注:Java 1.7以下是这样的Exception in thread "m
单元测试提示不到“Could not find the main class . Progam will exit”
使用myeclipse开发工具创建个单元测试,源代码如下rnrnimport junit.framework.*;rnimport UseCase.GeneratePrimes;rnpackage junit.framework;rnrnpublic <em>class</em> test1 extends TestCase rnrn public test1(String name) rn super(name);rn rn rn public static void <em>main</em>(String args[])rn rn junit.swingui.TestRunner.<em>main</em>(new String[] "TestGeneratePrimes");rn //testPrimes();rn rn rn public void testPrimes()rn rn int[] nullArray = GeneratePrimes.generatePrimes(0);rn assertEquals(nullArray.length,0);rn rn int[] minArray = GeneratePrimes.generatePrimes(2);rn assertEquals(minArray.length,1);rn assertEquals(minArray[0],2);rn rn int[] threeArray = GeneratePrimes.generatePrimes(3);rn assertEquals(threeArray.length,2);rn assertEquals(threeArray[0],2);rn assertEquals(threeArray[1],3);rn rn int[] centArray = GeneratePrimes.generatePrimes(100);rn assertEquals(centArray.length,25);rn assertEquals(centArray[24],97);rn rnrnrnrn[color=#0000FF]run as -> Junit test[/color]显示如下错误:rn[color=#FF0000]java.lang.UnsupportedClassVersionError: Bad version number in .<em>class</em> filern at java.lang.ClassLoader.defineClass1(Native Method)rn at java.lang.ClassLoader.defineClass(Unknown Source)rn at java.security.SecureClassLoader.defineClass(Unknown Source)rn at java.net.URLClassLoader.defineClass(Unknown Source)rn at java.net.URLClassLoader.access$100(Unknown Source)rn at java.net.URLClassLoader$1.run(Unknown Source)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at java.lang.ClassLoader.loadClassInternal(Unknown Source)rn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Unknown Source)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadTestLoaderClass(RemoteTestRunner.java:324)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createRawTestLoader(RemoteTestRunner.java:314)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createLoader(RemoteTestRunner.java:309)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.defaultInit(RemoteTestRunner.java:287)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.init(RemoteTestRunner.java:210)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.<em>main</em>(RemoteTestRunner.java:195)[/color]
Netbeans 7.0 生成的jar运行总是不到main class?
Netbeans 7.0 生成的jar运行总是<em>找</em><em>不到</em><em>main</em> <em>class</em>?rnrn
在eclipse中不到main()
public <em>class</em> HelloWorldrn public static void <em>main</em>(String[] args)rn System.out.println("hello world")"rn rn rn 在运行这个文件时,报出 <em>找</em><em>不到</em> <em>main</em>.<em>class</em> 文件的错误,请高手指教~~~
不到sub Main"的错误">"不到sub Main"的错误
我手中有一本比较早的vb.net的书,按照书中的代码输入vs.net后编译时<em>提示</em>“<em>找</em><em>不到</em>sub Main”,但程序中明明有“share SUB Main()...”的子程序,这是什么原因呢?请高手指教。
不到Sub Main
在我新建一个程式时,如果把Form1改为其它的名称,则会出现:rn在xx.form1中<em>找</em><em>不到</em>Sub Mainrn在我把Form1改为其它名称后,有设它为启动项目.rn为何还出现这样的问题呢?rn请各位先进指点rn谢谢!!rn
为什么总是说不到class TDateEdit
人家用delphi开发的一个系统,我把他考到我的机子上后,一打开源代码的主页面总是弹出 <em>找</em><em>不到</em><em>class</em> TDateEdit,我也安装了RX...(我忘了全名,是一个第三方空间的工具包),跟开发者一样安装在同一个相对目录下,还是说<em>找</em><em>不到</em><em>class</em> TDateEdit,是不是要设置<em>class</em>path的环境变量,还是什么其他的原因rn 谢谢
为什么会不到CLASS(菜鸟问题)
在JBuilder的一个工程中,存在文件WEB-INF/<em>class</em>es/com/robert/<em>class</em>1.<em>class</em>,在文件File1.jsp 中有:“ , rn但编译时File1.jsp报错:“cannot access <em>class</em> com.robert.<em>class</em>1”rn
could not find the main class :xxx
执行时出现这种<em>提示</em>,我退出又换了个工作空间又运行了一次,正常,很苦恼,求解
总是could not find the main class
用AXIS发布SOAP服务,用命令行发布:java org.apache.axis.client.AdminClient deploy.wsddrn为什么总是显示could not find the <em>main</em> <em>class</em> :org.apache.axis.client.AdminClient.Promgram will exit.
Linux 环境下,启动jar 包,提示main class not found
经过确认 是 MANIFEST.MF 文件有问题 Class-Path的格式要严格执行一下规则! 1)在 Class-Path: 后面有一个空格,切记  2)在 Class-Path: 后面写上你的jar 用空格分开  3)如果需要换行,切记在上一行末尾一定要有一个空格,下一行的开头一定要有一个空格  附上pom插件配置 org.apache.
Could not find the main class 问题
1、在eclipse中运行没问题rnrn2、在cmd下编译手动编译没问题,运行其他java写的程序没问题,所以我想可能不是<em>class</em>path问题rnrn3、程序里用了多线程和内部类rnrn <em>class</em>清单rn .rn ..rn 908 ChatServer$DisposeMsg.<em>class</em>rn 1,381 ChatServer$RecvMsg.<em>class</em>rn 1,933 ChatServer$SendMsg.<em>class</em>rn 1,953 ChatServer.<em>class</em>rnrnrn 运行的时候报以下错误 rnException in thread "<em>main</em>" java.lang.NoClassDefFoundError: ChatServer (wrong name: server/ChatServer)rn at java.lang.ClassLoader.defineClass1(Native Method)rn at java.lang.ClassLoader.defineClass(ClassLoader.java:621)rn at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)rn at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)rn at java.net.URLClassLoader.access$000(URLClassLoader.java:56)rn at java.net.URLClassLoader$1.run(URLClassLoader.java:195)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(URLClassLoader.java:188)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:307)rn at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:252)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)rnCould not find the <em>main</em> <em>class</em>: ChatServer. Program will exit.rnrn
更换jre版本后提示could not find the main class
我在ecilpse里新建一个java project,然后是一个<em>class</em>,在里面只写一个空的<em>main</em>方法,在jre1.6下可以正常运行(1.6.0_02、1.6.0_03两版都没问题),但是改用jre1.5就不成,<em>提示</em>如题,不知道是什么问题,是我1.5的jre本身有问题吗?还是别的设置有什么问题? rnrn赶上今天倒霉的sun还停机维护了,想弄个新的1.5试试都不成……麻烦大家帮忙看看怎么解决吧~~rnrn下面是代码rnpublic <em>class</em> test rnpublic static void <em>main</em> (String args[]) rn
jar提示: could not find the main class,program will exit
用JAR做EXE文件后,执行jar文件时总是<em>提示</em>没有<em>找</em>到主类,包内共两个文件,rnrnMANIFEST.MF如下:rnrnManifest-Version: 1.0rnCreated-By: 1.4.2_11 (Sun Microsystems Inc.)rnMain-Class: <em>class</em>es.Serverrnrn多谢关注~rnrn
can not find the main class问题.
这个问题我还是第一次碰到,首先声明的是,我的编译基本和运行的jre都是1.6的.eclipse也进行Project->clean.rngoogle上很多都说是jre的问题,说指向run configuration中的 <em>class</em>path 中的 user entities,advance,add folders,然后指向bin目录.rn是么,但是都不行.rn我甚至删除eclipse的 .metadata然后重新导入项目,还有替换项目下的 .<em>class</em>path,都不行.rn我在同一个包下运行普通的类很正常,但是运行一个继承ImageIcon,实现Runnable的类后,就是这样.rn会不会是 swing的问题?我的代码如下:rn[code=java]package spt.proxy;rnrnimport javax.swing.ImageIcon;rnimport javax.swing.JFrame;rnrnpublic <em>class</em> ImageIconProxy extends ImageIcon implements Runnable rnrn public static Object obj = ImageIconProxy.<em>class</em>.getClassLoader().getResource("img/absent.png");rn public static final ImageIcon ABSENT = new ImageIcon(rn ImageIconProxy.<em>class</em>.getClassLoader().getResource("img/absent.png"));rn static final ImageIcon LOADING = new ImageIcon(rn ClassLoader.getSystemResource("image/loading.png"));rnrn ImageIcon current = ABSENT;rn protected String fileName = null;rn protected JFrame callbackFrame = null;rnrn public ImageIconProxy(String fileName) rn// super(ABSENT.getImage());rn System.out.println("absent:" + ABSENT);rn this.fileName = fileName;rn rnrn public void load(JFrame callbackFrame) rn this.callbackFrame = callbackFrame;rn current = LOADING;rnrn callbackFrame.repaint();rn new Thread(this).start();rn rnrn @Overridern public void run() rn current = new ImageIcon(ClassLoader.getSystemResource(fileName));rn callbackFrame.pack();rn rnrn public int getIconWidth() rn return current.getIconWidth();rn rn rn public int getIconHeight() rn return current.getIconHeight();rn rn rn public void show() rn callbackFrame.setVisible(true);rn rnrn rn public static void <em>main</em>(String[] args) rn System.out.println("absent:" );rn rnrn[/code]
could not find the main class,...will exit.
不管写什么代码 都出现这个错误 我汗了 请问是什么原因?rncould not find the <em>main</em> <em>class</em>,...will exit.
win7 解决导出jar包提示 can not find the main class
win7 下 myeclipse 导出jar包后 不能双击运行,只能从dos中打开 修改文件关联执行命令
WIN7下运行Jar文件提示Could not find the main class
WIN7下运行Jar文件<em>提示</em>Could not find the <em>main</em> <em>class</em>
.bat运行JAVA时提示could not find the main class
小弟想把一段JAVA代码在WIN7自带计划任务程序执行,用.bat执行,在同一目录下可以执行,但是用WIN7计划任务执行时会报错rn[img=http://img.my.csdn.net/uploads/201212/25/1356402681_9041.png][/img]rn.bat运行java是学着http://blog.csdn.net/zhangxu365/article/details/7870263这个帖子做的rn以下是我.bat的代码rn[code=java]@echo off rnset CLASSPATH=C:\Program Files\Java\jdk1.6.0_31\bin\;./bin;D:\oracle\product\10.2.0\client_1\jdbc\lib\<em>class</em>es12.jar;E:\tools\jasperreports-4.8.0\lib\jxl-2.6.10.jar;E:\tools\axis\mail-1.4.jar;E:\tools\commons-email-1.2\commons-email-1.2.jar;E:\tools\commons-email-1.2\commons-email-1.2-javadoc.jar;E:\tools\commons-email-1.2\commons-email-1.2-sources.jarrnrnstart javaw com.demo.mailtest1rnrnexitrn[/code]rn如何解决啊
eclipse 提示Couldn't find the main class .process will exit
eclipse中rn导入spring frame后 rn运行简单的HelloBean时<em>提示</em> rncouldn't find the <em>main</em> <em>class</em> .process will exitrnrn很郁闷,只有玩spring的时候才有<em>提示</em>rn要是一般的应用程序没有问题rn还有就是代码没有错误rn[code=Java]/**rn * ServiceBean.javarn * package java.spring.beanfile2;rn * @author leichizhishourn * Created on 2009-12-08rn *rn */rn/**rn * Interface of service facadern * @author leichizhishourn */rnpackage java.spring.beanfile2;rnpublic interface ServiceBean rn void addUser(String userName, String password);rn void deleteUser(String userName);rn boolean findUser(String userName);rn String getPassword(String UserName);rnrn[/code]rn rn[code=Java]/***rn * MyServiceBean.javarn */rnpackage java.spring.beanfile2;rnrnimport java.util.HashMap;rnimport java.util.Map;rnrnpublic <em>class</em> MyServiceBean rn private String dir;rn private Map map = new HashMap();rn public void setUserDir(String dir)rn this.dir=dir;rn System.out.println("set User dir to:"+dir);rn rn public void addUser(String userName,String password)rn if(!map.containsKey(userName))rn map.put(userName,password);rn else throw new RuntimeException("User Already exist");rn rn public boolean findUser(String userName)rn return map.containsKey(userName);rn rn public void deleteUser(String userName)rn if(map.remove(userName)==null)rn throw new RuntimeException("User not exist");rn rn public String getPassword(String userName)rn return (String)map.get(userName);rn rnrn[/code]rn[code=Java]/**rn * Main.javarn */rnpackage java.spring.beanfile2;rnrnpublic <em>class</em> Main rn public static void <em>main</em>(String [] args) throws Exceptionrn MyServiceBean service = new MyServiceBean();rn service.addUser("bill","hello");rn service.addUser("tom","goodbye");rn service.addUser("tracy","morning");rn System.out.println("tom's password is:"+service.getPassword("tom"));rn if(service.findUser("tom"))rn service.deleteUser("tom");rn rn rnrn[/code]rn急求解答rnrn
用elipse 生成.jar文件后,双击运行,提示不到main class,请高手帮忙!!
我按照eclipse 的welcome页面下的tutorials一步步的生成了一个SWT小程序,在eclipse当中可以运行。我导出成.jar文件后双击再运行显示<em>找</em><em>不到</em><em>main</em> <em>class</em>,命令行下运行,显示Exception in thread "<em>main</em>" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Composite。我在导出.jar文件的过程中已经选了<em>main</em> <em>class</em>.请问各位高手,我错在哪了?应该怎么改?
main" java.lang.NoSuchMethodError:main">运行提示:Exception in threa "main" java.lang.NoSuchMethodError:main
import javax.microedition.midlet.*;rnpublic <em>class</em> HelloMIDlet extends MIDletrnrn public HelloMIDlet()rn rn //建構式rn rn public void startApp()rn rn rn public void pauseApp()rn rn rn public void destroyApp(boolean unconditional)rn rn rnrnrn运行<em>提示</em>:Exception in threa "<em>main</em>" java.lang.NoSuchMethodError:<em>main</em>rnrn请问问题出在那
提示不到不到MSVBVM60.DLL
为什么我做的一个小软件在我自己机上运行(WIN2000)什么问题都没有,在一个朋友机上运行就<em>提示</em>“<em>找</em><em>不到</em><em>找</em><em>不到</em>MSVBVM60.DLL”,然后我把我的MSVBVM60.DLL拷到和那个软件一个目录下就又能运行了,而其他的朋友有的有同样问题,有的没有,这是为什么?
为什么一直提示can not access class/directory
我下了一个Alloy的东东,据说可以改变程序的外观,但是要按照要求配置,我就按照要求。rncom.incors.plaf.alloy.AlloyLookAndFeel.setProperty("alloy.licenseCode", "x#myCompany#skd23j#dsjd9");rntry rn javax.swing.LookAndFeel alloyLnF = new com.incors.plaf.alloy.AlloyLookAndFeel();rn javax.swing.UIManager.setLookAndFeel(alloyLnF);rn catch (javax.swing.UnsupportedLookAndFeelException ex) rn // You may handle the exception herernrn可是告诉我can not access <em>class</em>rnrn好,我就把alloy.jar解压了,在jdk目录下面的src/com/中发了一份(按照com.incors.plaf.alloy的顺序),在jb6中import com.incors.plaf.alloy.*(有<em>提示</em>代码)rnrn但是错误多了一个就是连directory也<em>找</em><em>不到</em>rnrn我就又在jb的lib中rn项目文件的com中都拷贝了一份rnrn可是问题还是没有解决,帮帮我吧。
class ……"?">为什么JB8中提示"Cannot access class ……"?
我在JB8中打开sample/TextEditor总是<em>提示</em>"Cannot access <em>class</em> javax.swing.UIManager",请问是为什么?
提示Class tbutton not found ??为什么呢?
Var somecomp:Tobject;rn function createa<em>class</em>(const a<em>class</em>name:string):Tobject;rn varrn c:Tform<em>class</em>;rn someobject:tobject;rn beginrn c:=Tform<em>class</em>(find<em>class</em>(a<em>class</em>name));//<em>提示</em><em>class</em> tbutton not found????rn someobject:=c.Create(nil);rn result:=someobject;rn end;rn procedure getbase<em>class</em>info(a<em>class</em>:Tobject;astrings:Tstrings);rn varrn <em>class</em>typeinfo:Ptypeinfo;rn <em>class</em>typedata:Ptypedata;rn enumname:String;rn Beginrn <em>class</em>typeinfo:=A<em>class</em>.ClassInfo;rn <em>class</em>typedata:=Gettypedata(<em>class</em>typeinfo);rn with astrings do beginrn add(format('<em>class</em> name: %s',[(<em>class</em>typeinfo.name)]));rn end;rn end;rnbeginrn listbox2.Items.Clear;rn somecomp:=createa<em>class</em>('TButton');rnend;rn
Java写了main()方法运行时在类 class不到 main 方法
原因是在同一个包下写了不止一个<em>main</em>()方法
springboot打包不到class
springboot项目maven打包后<em>找</em><em>不到</em>依赖包中的<em>class</em> java.io.FileNotFoundException:xxxxxxxx.<em>class</em> : 解决方法:给被依赖的包中pom加 org.springframework.boot spring-boot-maven-plugin
vim命令模式下使用下载
vi(vim)是上Linux非常常用的编辑器,很多Linux发行版都默认安装了vi(vim) 相关下载链接:[url=//download.csdn.net/download/qilunaihe/4193450?utm_source=bbsseo]//download.csdn.net/download/qilunaihe/4193450?utm_source=bbsseo[/url]
将控制面板添加到我的电脑中.rar下载
将控制面板添加到我的电脑中.rar 相关下载链接:[url=//download.csdn.net/download/lance588/4447694?utm_source=bbsseo]//download.csdn.net/download/lance588/4447694?utm_source=bbsseo[/url]
f660破解工具下载
破解工具好用,破解工具好用,大家可以试试,试试就知道。 相关下载链接:[url=//download.csdn.net/download/u010034533/8218747?utm_source=bbsseo]//download.csdn.net/download/u010034533/8218747?utm_source=bbsseo[/url]
相关热词 c#部署端口监听项目、 c#接口中的属性使用方法 c# 昨天 c#func链接匿名方法 c#怎么创建文件夹 c#从键盘接收空格 c#da/ad c#部门请假管理系统 c#服务器socket c# 默认的访问修饰符
我们是很有底线的