Have you tried wrapping up your class in a jar file and placing it into jboss/lib folder?
What is the error message that you get? How do you test?
If you are testing directly from within the Test tab in the Sqript QPAC window, then you should probably read this thread and follow Howard's advice for adding jars to the Designer classpath
The other option is to write a custom QPAC to do the work for you. In my opinion, in the long run it's easier to write a custom qpac unless you're trying to do something very simple.