Running a Java Class

Hey all -
I have a java file that I’d like to use to compliment my AS app. My .java file is in the Resources folder, and following the Multi-Language example, I used this:

call method "main" of class "dtb" with parameters {"~/Desktop/songs.dtb"}

(The java file is dtb.java)
Now, this is the first time I’ve ever done anything like this, so if that line looks completely stupid, you must understand.
Anyway, this line does nothing. When the program is run from the command line, it creates a file. Here, it just stays quiet. No file is created and no error is displayed. Code after the line runs, so I’m sure it isn’t hanging.
How many things am I doing wrong here, and what are they? Do I maybe need to format the java file differently? (It’s just a normal java program now)

Bump for new information: I changed the method in the java class so that it returned a boolean (it was returning void before), and now I have this:

set bob to call method "mains" of class "dtb" with parameters {"~/Desktop/songs.dtb"}

which returns the error “the variable bob is not defined”.
I’ve also imported com.apple.cocoa.foundation.* and com.apple.cocoa.application.* into the class like they did in the example, though apparently it didn’t make any difference. (But it couldn’t hurt, right?)

Also, I tried to run the Multi-Language example, and clicking either of the Java buttons brings up a message that says, “Can’t make current application into type anything”. I’m running 10.4.10, PPC. Is it even possible with my computer?

Alright, I broke down and I’m using do shell script to do it. Probably not the most efficient way, but I can’t get anything else.