![]()
(chat, newsreader, calendar)
|
![]() |
|
|
|
Course Notes Table of Contents Exercises | Online Training Index
|
|
Packing Central Perk with Marcel
MageLang Institute
|
[Help | Solution |
API Docs |
Behavior |
Course Notes |
Exercises]
PrerequisitesSkeleton CodeMarcel is Ross's monkey on Friends. He's going to help you package up our Central Perk Bean, from the last exercise, into a .jar file for use within the BeanBox, or some other builder tool. You'll also create a supporting BeanInfo class for the Bean.
Perform the following tasks:
Create the associated BeanInfo class for CentralPerk. In it, set the descriptive name of the Bean to "Billboard". The next thing you need to do is to create a manifest file for the Bean's .jar file. Normally, the jar command can create the manifest for you. However, in order for the Bean-builder tool to know that one of the .class files is a Bean, you have to manually create a manifest file. For every .class file, you need to include a line of the form: Name: Marcel/CentralPerk.class Make sure you use a UNIX-style separator character ('/') between directory names and filename. The DOS-style separator ('\') is not valid here. For the class that is a Bean, include a second line after the Name: line Java-Bean: True Between each entry, include a blank line. The actual filename you use for the manifest does not matter. From the directory above your package directory, create the jar file. Load the jar file with the 'LoadJar' menu choice under the 'File' menu. The Billboard bean should now appear in the Toolbox. Try it out.
|
|
Copyright © 1997 MageLang Institute. All Rights Reserved May-97 Copyright © 1996, 1997 Sun Microsystems Inc. All Rights Reserved |