Mark Stephens

Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX.

He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.

Upgrading PDF viewer plugin to NetBeans 6.8

1 min read

The NetBeans platform continues to come on in leaps and bounds and 6.8 is the most polished version version yet.Because we produce a free PDF plugin viewer for Eclipse, IDEA and NetBeans, we download the new releases on a fairly regular basis and update the plugins.  Usually there is very little need to make any changes – we fix some bugs, add in the latest Jpedal update and rebuild the plugin.

When I tried to update the PDF viewer in NetBeans 6.8, however, I got this interesting message…

“The module named org.netbeans.modules.editor.deprecated.pre61completion/0 was needed and not found” – definitely one of the more cryptic error messages I have seen recently…

A quick search on google revealed quite a few messages about the subject. It seems something has changed in release 6.5 and plugins originally written in older releases may be effected. There is a solution in the form of a new nbm module you can download to fix it, but I was not happy with this solution – I keep trying to make our downloads smaller and simpler.

Our plugin is setup as a LIBRARY project (jpedalLIBRARY) containing the jars we use and an plugin (PDFViewer) containing the actual plugin code bundled together as a module Suite (jpedalSUITE).

The solution I found was to tidy up the dependencies of the actual PDFviewer plugin project. This is accessed by choosing the project and then accessing properties from the menu. NetBeans is highly modular and you can set the dependencies  (ie ensure that your plugin can access any required libraries). This is set in the properties menu.  NetBeans allows you to add any dependencies and I had added several while experimenting which I did not need. 

I removed Editor and Editor library, and the problem disappeared! So the legacy issue appears to be in these modules.

So if you have this problem, you either need to prune your APIs – I have not worked out exactly which item contains the issue.  And when you have finished, maybe you might like to try our free PDF viewer plugin (which now works in your shiny new copy of NetBeans 6.8)…

Mark Stephens

Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX.

He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.

Leave a Reply

Your email address will not be published. Required fields are marked *