• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

embedding policy file in a jar file

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wish to deploy an applet on a web browser through a html code. The applet requires a policy file to deployed successfully. Currently, I can deploy the applet through the command line as following:

java -J-Djava.security.policy= mypolicy.policy AppletDeployment.html

how can I add the policy file in a jar file and thereafter how do I deploy the applet?
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not possible. That would amount to the applet setting its own security policy - not something that's allowed. The alternative is to sign the applet; see HowCanAnAppletReadFilesOnTheLocalFileSystem for details.
 
jNeha Jain
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much for the reply. I have already gone through the link you have provided but it hardly helped. I am new to signing applets and so could not decipher many of the things. As far as the inclusion of policy file in the jar file is concerned, can please clarify your point elaborately. I found a link :policy file in a jar which does throw light on it but not elaborately.
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's nothing to elaborate - it doesn't work, whatever that page you linked to may say (the approach described on that page is not applicable to applets).

If you have specific questions about signing, tell us what, exactly, you did or did not understand, and we'll try to help you get going.
 
It is difficult to free fools from the chains they revere - Voltaire. tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!