Sun Java Solaris Communities My SDN Account Join SDN
 
Tutorials & Code Camps

Magercise 2 - Working with Beans

 
Training Index
 

[Help | API Docs | Short Course | Magercises]


There is no skeleton code for this Magercise; simply use the solution files to perform the prescribed tasks. These tasks include building, packaging, and loading a Bean into the BeanBox.

Magercise 2 Prerequisites

Tasks

  1. The first step is to create a working directory somewhere on your filesystem, hereafter referred to as workingdir.

  2. Next, create the directory simple (all lowercase characters) directly under workingdir.

  3. Next, (1) save all the solution files, except Simple.java, within workingdir and (2) save the solution file Simple.java within simple, that is, within workingdir/simple.

  4. Compile Simple.java from workingdir by including the simple directory in the path specification.

  5. Build Simple.jar from workingdir by executing the file MakeSimpleJar.bat (Windows) or MakeSimpleJar.sh (UNIX).

  6. Next, load the Simple Bean into the BeanBox using "LoadJar..." from the BeanBox "File" menu.

  7. Lastly, select Simple from the palette and create an instance on the worksheet.

Where help exists, the task numbers above are linked to the step-by-step help page.

Solution Source

Demonstration

After loading the Simple Bean, it should appear in the palette, from where it can be selected and instantiated on the worksheet:

Magercise 3
Short Course
About This Short Course

Copyright © 1998-1999 MageLang Institute. All Rights Reserved.