Open Codewarrior IDE and choose New Project from the
File menu.
Click on the arrow next to Java to display the submenu
and choose Java Library.
Click on the arrow next to Sources to open the Sources
folder in the Project Window and then click on the sources
folder.
Add desired files by choosing Add Files from the Project
Menu. Each
file in the package must have as its first statement
package name; where name will be the name of
the package.
Remove TrivialClass.java by selecting it and
choosing Remove Selected Items from the Project menu.
Go to Java Application Settings under the Edit menu, and
then to Java Output (under Linker heading) and change the name
to namePackage.jar, where name is the name of
the package. (This is a suggested file name.)
Save and close the Java Application Settings window.
Choose Make from the Project menu. This will create the
jar file for your package.
Using Your Package
Open a project in the usual way.
Every file which uses a class from your package must
have near the beginning the statement import name.*;
where name will be the name of the package.
Add the jar file for the package to your project.
If you are writing an Applet also keep a copy of the jar file in
the folder with your other files for the project. You must also list
the jar file in the html file. An example follows: