Specifying the location of BeanInfo classes
The visual editor requires the BeanInfo classes at design time and run time to determine the behavior of the various components. You can decide where to keep the BeanInfo classes.
The classes that you develop in the visual editor for Java must be stored in Java projects. Each Java project has a build path that includes references to other projects inside your workbench workspace or external JAR files that exist in the file system. The packages included in the build path are used to compile the classes in the project, and they are also used by the visual editor for Java to create the class path of the virtual machine where it runs the Java beans at design time.
There are several ways that you can organize your resources:
Keeping beans and BeanInfo classes in different projects
When you develop classes in the visual editor for Java, you have the option to keep your .java files and BeanInfo classes in different projects. This enables you to easily develop and deploy the classes separately.Keeping beans and BeanInfo classes in the same package
A Java bean and its associated BeanInfo class are in the same package, then the introspector will be able to find the BeanInfo class.Keeping beans and BeanInfo classes in different packages in the same project
When you develop classes in the visual editor for Java, you have the option to keep your .java files and BeanInfo classes in different packages within the same project.Keeping BeanInfo classes in a JAR file
You can keep your BeanInfo classes in a separate JAR file in the same project as the Java beans that they define, in a separate project, or on the file system.Explicitly defining the location of BeanInfo classes
You can explicitly define the location of BeanInfo classes that are external to the workbench by using a class path variable. The variable can point to either a JAR file or a folder that exists in the file system.
Parent topic
Extending the visual editor for Java
Related concepts
BeanInfo classes and introspection
BeanInfo classes for JRE classes
Tips for writing BeanInfo classes for the visual editor
Related tasks
Controlling BeanInfo information for plug-in developers