Possible Kawa Problems

 

1. Problem: I have a project, but the compile and run buttons are greyed out.

Solution: Make sure your project is "open". Right click on the project file and select open. Kawa can have many projects in its main window, but at most one can be open at a time.

Note that you can "delete" a closed project from Kawa, but it won't remove anything from your disk. Close the project by right clicking on its icon and choosing close. Then right click again and choose delete.

You can similarly remove a file from a project. The file itself won't be deleted from the disk, however.

2. Problem: I can compile ok, but it won't run at all.

Solution: Make sure that you have selected one of your files as the main file. Right click on the file you want to begin with. This file must have a class with a main function, of course. The desginated file will have a red box drawn around it in the project pane.

3. Problem: When I run I get a NoClassDefFound exception in main.

Solution: Either you havent set the Customize->Project Root Options properly or your project file (...kpx) is not in the same place as your java files. To move the kpx file first close and remove the project from Kawa. Then move the file manually, then choose Open Project from the Project menu and navigate to the kpx file in its new location.

The Root Options dialog should look like this:

Root Options Dialog

Set the period in the Compilation output directory option by clicking on the >> button and then typing a period in the Add/Edit field on the next dialog. Then click Add/Update there and Finally OK on that pane and then OK on this one.

4. Problem: I've got Junit installed, but I can't seem to compile the test code.

Solution. Make sure Kawa knows where to find Junit. The best way is to set the Project->Classpath option in Kawa as follows.

The above assumes, of course that this is where your junit really was installed. You need to substitute your own path. The easy way is to select New in this dialog and then AddFile. You can then navigate to the file and double click it.

Possible Project Problems not related to Kawa

1. Problem: When I run the program the database seems to be empty and the SystemTest fails with errors in InvoiceTest.

Solution. You may have reinitialized the database inadvertantly. Restore it either by re-extracting the initial test2.dat file from the zip archive or restore it from a previous maintaince backup.

2. Problem: I've changed one of the course project files and it compiles OK. However, when I run I get a message that the run "Failed restoring database" and an InvalidClass exception.

Solution: The database contains a certain signature of the class as well as the data objects. Before you can continue you need to either

  1. Deal with versioning (an advanced topic) on the live data. This requires you begin with the old version of the class, however.
  2. Restore the database from a previous maintaince backup. It is a good idea to have made this backup before you begin your class changes, however.