eclipse调试出问题
在用eclipse调试程序时,有时出现这种现象“theselectiondidnotcontainanyresourcesthatcanrunonaserver”,是什么...
在用eclipse调试程序时,有时出现这种现象“the selection did not contain any resources that can run on a server”,是什么原因呢??是我的设置哪里出了问题吗??
我是从那个main函数那个类开始,但我怀疑是不是因为某些情况下,eclipse自动以run on a server 的方式运行程序哦(本应该是application嘛),如果是这样的话,又该怎么避免呢?? 展开
我是从那个main函数那个类开始,但我怀疑是不是因为某些情况下,eclipse自动以run on a server 的方式运行程序哦(本应该是application嘛),如果是这样的话,又该怎么避免呢?? 展开
展开全部
调试的时候从有main函数的类开始
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
要看是什么情况下出现的错误,eclipse官方给出的可能有下面几种:
Run/Debug menu not appearing
Run/Debug menu appearing on something that's not runnable
Run on Server not appearing
Run on Server appearing on something that's not runnable
Run on Server appears but fails on execution
具体原因:
Run/Debug menu not appearing
This problem occurs when the selected object cannot be adapted (either directly or via an adapter factory) to ILaunchable. The owner of the object should provide an adapter to make the menu appear.
Run/Debug menu appearing on something that's not runnable
This problem occurs when the selected object is incorrectly adaptable to ILaunchable. The owner of the object should remove the ILaunchable interface or the adapter factory that supports the object.
Run on Server not appearing
Is Run on Server not appearing on an object that you think is runnable? Contact the development team responsible for the artifact (e.g. J2EE team for Servlet) and ask them to add support.
Run on Server appearing on something that's not runnable
This problem can only occur when some plugin is using the moduleArtifactAdapter extension point to enable for an object that it shouldn't. Use the steps below to figure out which plugin is causing the problem and open a defect up against them.
Using a development environment, turn on tracing for org.eclipse.wst.server.ui and launch a workbench. When you right click on the object and hover over the Run menu, the following line of trace will be output as Run on Server appears: "Run On Server for XX is enabled by YY." XX is the object that you have selected, and YY is the extension point id for the plugin that is doing the enablement. Track down the id and open a defect against this component.
Run on Server appears but fails on execution
This problem can only occur when a plugin provides enablement for an object but does not allow the object to adapt to IModuleArtifact. Use the tracing steps above to identify the plugin and open a defect to get the object adapted.
Run/Debug menu not appearing
Run/Debug menu appearing on something that's not runnable
Run on Server not appearing
Run on Server appearing on something that's not runnable
Run on Server appears but fails on execution
具体原因:
Run/Debug menu not appearing
This problem occurs when the selected object cannot be adapted (either directly or via an adapter factory) to ILaunchable. The owner of the object should provide an adapter to make the menu appear.
Run/Debug menu appearing on something that's not runnable
This problem occurs when the selected object is incorrectly adaptable to ILaunchable. The owner of the object should remove the ILaunchable interface or the adapter factory that supports the object.
Run on Server not appearing
Is Run on Server not appearing on an object that you think is runnable? Contact the development team responsible for the artifact (e.g. J2EE team for Servlet) and ask them to add support.
Run on Server appearing on something that's not runnable
This problem can only occur when some plugin is using the moduleArtifactAdapter extension point to enable for an object that it shouldn't. Use the steps below to figure out which plugin is causing the problem and open a defect up against them.
Using a development environment, turn on tracing for org.eclipse.wst.server.ui and launch a workbench. When you right click on the object and hover over the Run menu, the following line of trace will be output as Run on Server appears: "Run On Server for XX is enabled by YY." XX is the object that you have selected, and YY is the extension point id for the plugin that is doing the enablement. Track down the id and open a defect against this component.
Run on Server appears but fails on execution
This problem can only occur when a plugin provides enablement for an object but does not allow the object to adapt to IModuleArtifact. Use the tracing steps above to identify the plugin and open a defect to get the object adapted.
参考资料: http://www.eclipse.org/webtools/wst/components/server/runOnServer.html
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询