3/24/2008

Install FindBugs plugin in NetBeans 6

To install FindBugs in NetBeans 6, the basic idea is to add an updatecenter configuration to NetBeans plugin manager. It will then periodically keep your installed plugin updated. These are the steps that worked for me. Note that these steps will install FindBugs + PMD + CheckStyle co-bundled plugins.

1, Go to NetBeans Tools -> plugins, click Settings tab. It shows a list of existing update centers like 3rd Party Plugins, NetBeans, NetBeans Beta, Plugin Portal.

2, Click Add button on the right side. You will see a Update Center Customizer popup, asking for Name and URL. Enter the following values. You may also enable Check for updates automatically.

Name: SQE Update Center
URL: https://sqe.dev.java.net/updatecenters/sqe/updates.xml

3, Click OK and you will see it is added the the list of update centers. Otherwise, most likely your network proxy is not properly configured. You can also manually verify the above URL in the browser.

4, Click Available Plugins tab, and then click the Reload Catalog button beneath the tab. After a short while, you will see a long list (close to 100) plugins. Plugins that are already installed are not included here.

5, Click Category column head to sort them. Notice 3 plugins under Quality category: SQE Java, SQE Update Center, SQE Platform.

6, Select all 3 plugins and click Install button. The rest is just clicking a few OK buttons. At the end, you will see 4 new icons on your tool bar: Check Quality, Run FindBugs, Run PMD, Run CheckStyle.

sqe (Software Quality Environment) is a java.net project. It also has instructions for integrate these tools with NetBeans here. But this page is slightly dated, with an invalid updatecenter URL (https://sqe.dev.java.net/updatecenters/sqe/catalog.xml). That page consists largely of screen shots and no way to copy that URL, which is the most critical data.

In sqe home page under Announcement section, it does mention that:
There is a new updatecenter url for NetBeans6 Beta 1 or later compatible development builds (pre-alpha) https://sqe.dev.java.net/updatecenters/sqe/updates.xml.This should allow the PluginManager to detect SQE as as 3 plugins (all other modules are hidden)!

12 comments:

coroner said...

could you please post a simple example of a servlet accessing an ejb through dependency injection in jboss . I am unable to do it for almost three weeks now. :( please help.

thank you very much in advance.

my id
coroner.john@gmail.com

javahowto said...

JBoss AS is not JavaEE 5-compliant yet (as of 3/30/2008). So it's possible something is not working. But its EJB 3 works has been going on for around 3 years. So I suppose these basic operations you described should be well supported. I will what I can do here.

javahowto said...

Please see the next post:
http://javahowto.blogspot.com/2008/03/servlet-ejb3-sample-on-jboss-as-5-beta.html

coroner said...

Thanks for replying man. I have been using jboss 4.2.2 and pulling my hair out to get this stupid DI to work. I mean i am able to use the DI from within an ejb but not in a servlet, in a servlet i still jndi look it up. But all the features work cool in glassfish but it is a little slow and does not print stdout to the screen instead prints to a file. Could you please let me know if DI works in a s ervlet in jboss 5 that u r using.
thank you.

javahowto said...

My sample in the next post does use DI in servlet class. This is how my servlet class obtains a bean ref. No lookup.

JBoss AS 4.x is a J2EE 1.4 (NOT JavaEE 5) appserver. You can add its EJB3 container to it. But a servlet-EJB3 app also requires JBoss 4.x web container to be able to support DI, which doesn't seem to be the case.

As for which is faster and which is slower, I would be very careful with such comparison. Any simplehello-type micro benchmarking can be misleading.

Anonymous said...

This is sweet! Thanks!

FL Geek said...

this was actually helpful... i couldn't find anywhere else how to do this thing...thanks a lot!

cometta said...

does the update site still working? i get error of nbm file on netbean6.5

cometta said...

may i know findbugs on netbeans comes with autofix ? on eclipse, i able to do autofix, but not in netbeans

Anonymous said...

Note that the old URL doesn't work, because it has an invalid ssl-certificate. Use http://deadlock.netbeans.org/hudson/job/sqe/lastStableBuild/artifact/build/full-sqe-updatecenter/updates.xml instead. (Which works for Netbeans 7 as well, but comes with numerous unsigned plugins)

kaviddiss said...

Thanks for posting the new url. BTW, Netbeans 7.2 supports FindBugs out of the box, see Geertjan's post here: https://blogs.oracle.com/geertjan/entry/netbeans_ide_7_2_findbugs

Anna said...

Great and Useful Article.

Online Java Course

Java Online Training

Java Course Online

J2EE training

online J2EE training

Best Recommended books for Spring framework

Java Interview Questions












Java Training Institutes in Chennai

Java Training in Chennai

J2EE Training in Chennai

java j2ee training institutes in chennai