Package Tab…

Index


Kawa package tab is a very important piece of Kawa. It is important to understand how packages work under Kawa in order to use Kawa efficiently. When Kawa is first installed it comes with all the packages that are defined in JDK 1.1.x packages. All the package information is stored in a file called kawa.pkg, which can be located in the Kawa files directory. It is possible to open a Kawa package file anytime after Kawa has started by selecting File/Open and selecting the .pkg file to open. This will populate the package tab with all the packages information from the opened file.

Kawa uses the information from the package tree to provide the all important override feature. In order to be able to override from non-JDK packages it is important to first add the package to the Package tab by selecting one of the Add/Update options from the right button menu of the root item in the tree. JDK package information can be updated when Javasoft comes out with new releases by just selecting Add/Update and selecting the appropriate java files or class files or jar or zip file to update the package information.

Adding Jar and Zip Files -

Now it is possible to add even .class files, .jar files and .zip files into the package tree by simply selecting Add Class… or Add Zip/Jar… option from the right button menu and selecting one or more class files or zip file or jar file to be added to the package tree. This allows addition of classes for which source code is not available. This is done through Java reflection API. Kawa comes with a class file called DumpClass.class which is packed into classes.zip under Kawa directory which does the actual reflection of the class to identify all the methods and variables.

If the selected Java file for addition does not belong to any package then it is added under a default package name called User. This feature can be used to add Java files temporarily to package tree for some quick overrides of methods from any class. Shown below is a screen snapshot of the package tab with one of the standard JDK class expanded to show the methods and variables defined in the class.

 

As shown above the package tab

Class Context Menu -

Package tree now displays all the inner class information and exception thrown information as shown in the top most figure above. Since Kawa upgrade setup does not upgrade the package file it is necessary to update all the Java package files to display the inner class and exception information. Also, because of the new information displayed in the project tree the memory requirement for the package tree has increased. Therefore, it is important to keep the package tree very concise as possible.