BeanInfo classes for JRE classes

The Java beans for classes included in the JRE are supplied as part of the visual editor for Java. These define the behavior of classes such as javax.swing.JButton or javax.swing.JFrame inside the workbench.

If you want to override these classes, you can create your own BeanInfo classes and add them to the BeanInfo Path. To do this, use the BeanInfo classes page of the project you want to affect.

The virtual machine that is created for the introspector has its class path set up as follows:

  1. The items in the BeanInfo classes on the BeanInfo Path for the project itself.

  2. All exported items in the BeanInfo classes for any projects in the Java build path.

  3. The items in the Java build path for the project itself

When a Java project is created, it has an entry (which is usually the keyword JRE_LIB) in its Java build path that points to the location of the JRE.

You can change the location of the JRE by opening the class path variables used by the workbench and specifying a new default Java run-time environment. The default run-time environment is always used as the value of the reserved class path variable JRE_LIB. The Java beans supplied with the visual editor for Java are included in the build path of the introspector only when the JRE_LIB entry is present in the Java build path. If you delete the JRE_LIB entry from the Java build path, then the BeanInfo classes will be not found. Also, most of the custom behavior of the visual editor for Java will become lost for the visual Java beans.

To help performance, the results of performing introspection on Java beans is cached. When details affecting the result of introspection are changed, the cache should be cleared. However, if this does not occur for any reason, you can empty the cache and force re-introspection for a project by closing and reopening the project.

 

Parent topic

BeanInfo classes and introspection

 

Related tasks

Controlling BeanInfo information for plug-in developers
Specifying the location of BeanInfo classes