如何在Eclipse IDE中的Apache Tomcat服务器中部署创建的.jar文件? [英] How to deploy created .jar file in Apache Tomcat server in Eclipse IDE?

查看:114
本文介绍了如何在Eclipse IDE中的Apache Tomcat服务器中部署创建的.jar文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经陷入在Eclipse中部署创建的.jar文件的过程中。

Eclipse位于位置: E:\eclipse / strong>



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



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

 同时,在Eclipse中创建jar文件的步骤是:




1。右键单击您的Java项目并选择导出。



2。展开Java节点并选择JAR文件。



3。在 JAR文件规范页面中,选中说明 导出Java源代码文件和资源



4。选择出口目的地为: E:OneForAll.jar ; OneForAll 是.jar文件的名称



5。检查选项 压缩JAR文件的内容



6。 Next --->完成


按照上述步骤,可执行文件 JAR 文件是在指定位置创建的。只需检查所有文件是否已经在.jar组件中提取,当我选择 Extract files 选项时,所有源文件都是可追溯的。但是,双击它会引发错误:无效或损坏jarfile 'E:OneForAll.jar'



我觉得我迷路了。 我错过了什么? 出了什么问题?



<

所以你在Eclipse中成功运行?但现在您要部署此测试的Web应用程序?



然后



  1. 右键单击在您的Java项目中,选择导出。


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



这将导出tomcat所需的WEB-INF和相关文件。



回答下一步做什么如何在Tomcat 7中部署war文件


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

Eclipse is at location: E:\eclipse

Web project is at : E:\Runtime_Testing\src\study_to_night

Tomcat is at location: 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 File Specification page, checked the option which says "Export Java source files and resources"

4. Selected the export destination as: E:OneForAll.jar; OneForAll being the name of my .jar file

5. Checked the option "Compress the contents of the JAR Files"

6. Next ---> Finish.

On following the above steps, an executable JAR file is created at the specified location. Just to check if all the files have been extracted in the .jar component, when I chose "Extract files" option, all source files were traceable. However, on double-click it throws Error: Invalid or corrupt jarfile 'E:OneForAll.jar'.

I feel I'm lost. Is there something I missed out? What went wrong?

Could someone walk me through the steps to do this manually ?

解决方案

So you have it running successfully within eclipse? But now you want to deploy this tested web app?

Then

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

  2. Expand the Web node and select WAR file.

This exports the WEB-INF and related files that tomcat needs.

This question answers what to do next How to deploy a war file in Tomcat 7

这篇关于如何在Eclipse IDE中的Apache Tomcat服务器中部署创建的.jar文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆