简体   繁体   English

在Eclipse中正确运行FindBugs插件

[英]Running FindBugs Plugin in Eclipse correctly

I came across FindBugs tool to identify connection leaks and other bugs which are present in my java code. 我遇到了FindBugs工具,以识别连接泄漏和Java代码中存在的其他错误。 I installed the plugin from the Eclipse Marketplace.I am using Eclipse Helios. 我从Eclipse Marketplace安装了插件,正在使用Eclipse Helios。 However even after a very long search I am not able to find any information on what to do next after installing the plugin.. I build my project from eclipse and after that I deploy the application on JBoss server. 但是,即使经过很长时间的搜索,在安装插件之后我也找不到任何有关下一步操作的信息。.我从eclipse构建项目,然后在JBoss服务器上部署了该应用程序。

I tried by restarting the server and accessing my application but FindBugs shows no bugs at all..Do I need to add any entries in my class path or any jars needs to be added to the build path?? 我尝试通过重新启动服务器并访问我的应用程序来尝试,但是FindBugs完全没有显示bug。我是否需要在类路径中添加任何条目,还是需要将任何jar添加到构建路径中? please guide. 请指导。

Firebug is for debugging Javascript, not Java. Firebug用于调试Javascript,而不是Java。 (It is plugin for Mozilla.) I assume that you are referring to Findbugs, not Firebug. (它是Mozilla的插件。)我假设您指的是Findbugs,而不是Firebug。

Findbugs is a static analysis tool . Findbugs是一个静态分析工具 Its purpose is to perform a static analysis of your source code looking for code patterns that are likely to cause problems. 其目的是对您的源代码执行静态分析,以查找可能导致问题的代码模式。 It can spot some common patterns that are likely causes of resource leaks, but it can't detect all kinds of leaks. 它可以发现一些可能导致资源泄漏的常见模式,但无法检测到所有类型的泄漏。

By the sounds of it, you need a different kind of tool - a dynamic storage leak detector. 听起来,您需要另一种工具-动态存储泄漏检测器。 See https://stackoverflow.com/questions/1716597/java-memory-leak-detection-tools for recommendations. 有关建议,请参阅https://stackoverflow.com/questions/1716597/java-memory-leak-detection-tools

I will recommend you to install CheckStyle . 我建议您安装CheckStyle It is like 10 times more awesome than FindBugs. 这真是FindBugs的10倍。

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

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