Examining the Packaged Bean

PC Repair Tools

Advanced Registry Cleaner PC Diagnosis and Repair

Get Instant Access

The end result of running the packager is two new files: a type library file (OurButton.tlb) and a file of Windows Registry entries (OurButton.reg). The Registry entries (excerpted in Listing 51.2) provide the glue to integrate the Bean with Windows—the new object's Class ID (CLSID), instructions to run the JRE when the object is referenced, and other relevant information.

Listing 51.2 Registry Entries (Excerpted) for the New ActiveX Object

1 REGEDIT4

2 [HKEY_CLASSES_ROOT\OurButton.Bean]

3 @= "OurButton Bean Control"

4 [HKEY_CLASSES_ROOT\OurButton.Bean\CLSID]

5 @= "{7FB22CF0-50F8-11D3-B327-005056FDBDB1}"

6 [HKEY_CLASSES_ROOT\OurButton.Bean\CurVer]

27 [HKEY_CLASSES_ROOT\CLSID\{7FB22CF0-50F8-11D3-B327-0 05056FDBDB1}\

JarFileName]

29 [HKEY_CLASSES_ROOT\CLSID\{7FB22CF0-50F8-11D3-B327-0 05056FDBDB1}\

JavaClass]

30 @= "sunw.demo.buttons.OurButton"

31 [HKEY_CLASSES_ROOT\CLSID\{7FB22CF0-50F8-11D3-B327-0 05056FDBDB1}\

InterfaceClass]

32 @= "sun/beans/ole/OleBeanInterface"

65 [HKEY_CLASSES_ROOT\TypeLib\ {7FB22CF1-50F8-11D3-B327-0 05056FDBDB1}]

66 @= "OurButton Bean Control Type Library"

67 [HKEY_CLASSES_ROOT\TypeLib\ {7FB22CF1-50F8-11D3-B327-0 05 05 6FDBDB1}\1.0]

68 @= "OurButton Bean Control "

69 [HKEY_CLASSES_ROOT\TypeLib\ {7FB22CF1-50F8-11D3-B327-0 05 05 6FDBDB1}\1.0\

0\win32]

71 [HKEY_CLASSES_ROOT\TypeLib\ {7FB22CF1-50F8-11D3-B327-0 05 05 6FDBDB1}\1.0\

FLAGS]

73 [HKEY_CLASSES_ROOT\TypeLib\ {7FB22CF1-50F8-11D3-B327-0 05 05 6FDBDB1}\1.0\

HELPDIR]

Our little Java Bean has generated 74 lines of entries for the Windows Registry. These entries, along with OurButton.tlb and the original jar file (OurButton.jar), constitute the ActiveX control to be installed.

One modification is needed before installation. The Registry entries reflect our use of the c:\temp directory when we ran the packager. These references must, as part of installation, be changed to reflect the actual product installation directory.

Was this article helpful?

0 0

Post a comment