Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Online Training

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
 
Training Index

Introduction to the JavaBeans API, Magercise 2
Working with Beans

by John Zukowski, MageLang Institute

[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.


[ This page was updated: 27-Oct-99 ]

Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary - Applets - Tutorial - Employment - Business & Licensing - Java Store - Java in the Real World
FAQ | Feedback | Map | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-99 Sun Microsystems, Inc.
All Rights Reserved. Legal Terms. Privacy Policy.