简体   繁体   English

无法在eclipse中打开jar文件

[英]Unable to open jar file in eclipse

I am unable to open jar files in eclipse.我无法在 Eclipse 中打开 jar 文件。 For example:例如:

public class HttpSessionAndContextExa extends HttpServlet公共类 HttpSessionAndContextExa 扩展了 HttpServlet

if I want to see HttpServlet class it show me following error:如果我想查看 HttpServlet 类,它会显示以下错误:

javax.servlet.http.HttpServlet javax.servlet.http.HttpServlet
Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found.注意:此元素既没有附加源也没有附加 Javadoc,因此找不到 Javadoc。 Please help.请帮忙。

I got the solution.我得到了解决方案。 The issue is due to we have not added tomcat source file for servlet in eclipse:问题是由于我们没有在 eclipse 中为 servlet 添加 tomcat 源文件:

  1. right click on project -> prefrences -> Java Build Path -> Libraries -> add external jar - > add servlet-api.jar(in var/lib/tomcat/lib)右键单击项目 -> 偏好 -> Java 构建路径 -> 库 -> 添加外部 jar -> 添加 servlet-api.jar(在 var/lib/tomcat/lib 中)
  2. Then add java decopiler in your eclipse with market place.然后在你的日食中添加 java decopiler 与市场。 Help->eclipse marketplace->search “JadClipse” ->install帮助->eclipse 市场->搜索“JadClipse”->安装
  3. apply decompiler: window->prefrences->serach “decompiler” ->Apply应用反编译器:window->prefrences->serach“反编译器”->Apply

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM