如何在Eclipse IDE中的Apache Tomcat服务器中部署创建的.jar文件?

I'm stuck into the process of deploying created .jar files in Eclipse. 

Eclipse位于: E:\ eclipse

Web项目位于: E:\ Runtime_Testing \ src \ study_to_night

Tomcat位于: C:\ apache-tomcat-7.0.54-windows-x64

 Meanwhile, steps followed for creating jar files in Eclipse: 

1. Right click on your Java Project and select Export.

2. Expand the Java node and select JAR file.

3. In the JAR文件规范页面中checked the option which says “导出Java源文件和资源”选项

4. Selected the export destination as: E:OneForAll.jar ; OneForAll我的.jar文件名称

5. Checked the option “压缩JAR文件的内容” 5. Checked the option

6. Next ---> Finish.

按照上述步骤,将在指定位置创建可执行JAR文件。 只是为了检查是否已经在.jar组件中提取了所有文件,当我选择“提取文件”选项时,所有源文件都是可追踪的。 但是,双击它会抛出错误:无效或损坏 jarfile’E:OneForAll.jar’

I feel I'm lost. 我错过了什么吗? What went wrong?

有人可以指导我完成手动执行此操作的步骤吗?

所以你让它在eclipse中成功运行? 但是现在你想部署这个经过测试的网络应用程序?

然后

  1. 右键单击Java Project并选择Export。

  2. 展开Web节点并选择WAR文件。

这会导出tomcat需要的WEB-INF和相关文件。

此问题解答了下一步如何在Tomcat 7中部署war文件

Apache tomcat是一个Web容器,您无法在tomcat服务器中部署jar。 如果您创建了一个Web应用程序,那么将您的应用程序导出为war文件并将其放在tomcat webapp目录中,启动服务器并部署您的战争。

如果你有很多jar子,那么你仍然需要将它们捆绑为战争