Welcome to the JavaRanch.
The short answer to your question is: you can't. Letting an application in a browser have access to valuable system resources is a breach of security.
There are some alternatives. I worked an enterprise system where we had a "print" button on an applet that actually printed from the server. This was not a security problem since the application was not used by the world at large. Another alternative would be to create a signed applet. The application signature identifies the creator of the application and insures it has not been tampered with, so signed applets are given much more flexibility.