this is possible under certain circumstances.
http://java.sun.com/security/signExample
will step you thru an example to help you solve your problem.
also, for more up-to-date security info:
http://java.sun.com/products/jdk/1.2/docs/guide/security/index.html
thanks,
charlie