Kukmedis
Kukmedis

Reputation: 85

Printing and saving files in java applets

we have this problem: we want to save files or print from java applet in browser, but this could not be easily implemented, as java applets don't seem to have rights for calling OS services. Is there any way to implement these two functionalities (maybe with server help etc.). What would you suggest? Thank you in advance

Upvotes: 1

Views: 1238

Answers (3)

Kukmedis
Kukmedis

Reputation: 85

Well the solution was very simple :). In Netbeans -> Project properties -> Application/Web Start/{check the self-signed checkbox}. That's it with all certifications

Upvotes: 1

AlexR
AlexR

Reputation: 115378

Tomas is right. But probably I can suggest you a workaround. You can implement your print through browser. This does not require additional security permissions and applet might be unsigned.

To call javascript API from applet the applet must have attribute MAYSCRIPT and use netscape.javascript.JSObject. Yes, netscape! The name remained as a monument for this died browser.

Upvotes: 0

Tomas Narros
Tomas Narros

Reputation: 13488

For accessing resources outside the Applet sandbox, you'll need to sign your Applet, and set up the access privilieges at a policy file.

Here you can find a quite complete guide on Applets Security.

Upvotes: 1

Related Questions