HOWTO: Improved JPOX integration with NetBeans 4.0

This is an improved version of the integration of JPOX with NetBeans 4.0. This one makes use of the Library Manager feature that NetBeans 4.0 provides and allows project dependencies to be assembled in libraries. This eliminates the need for the developer to copy files for each and every project.

# Create a JPOX library by clicking on Tools -> Library Manager -> New Library and adding the JPOX JAR files.
# Add the library to the project by right-clicking on the project, selecting Properties… and following the prompts.
# Select the JPOX library from the list.
# Add the following code extract to build.xml.

Note that the enhancement is done right after the compilation (-post-compile) instead of just before the project is packaged. This has the advantage of working with any type of project that performs a compilation.

Technorati Tags: ,

2 Replies to “HOWTO: Improved JPOX integration with NetBeans 4.0”

  1. Hi,

    I’ve tried your latest implemention of your Netbeans JPox enhancer… But I found this error has occured.

    Enhancing the MODULE files
    java.lang.NoClassDefFoundError: org/apache/bcel/generic/Type
    Exception in thread “main”
    Java Result: 1

    I’m not to sure what happening, perhaps you do.

  2. Hello,

    First, the JPOX Enhancer is not my work, but rather JPOX team’s. See I simply describes how to use it in NetBeans 4.0 as part of the build process.

    This particular error you get is because the BCEL is not in the classpath. One way to resolve this is to add the BCEL JAR file to the JPOX library.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: