Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Applets with JNI (urgent)

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I am trying to write a applet which will call some native functions. I was succesful in writing a application or similar purpose.
In the applet, I have used a digitally signed appet.
This applet when executed in the browser, fails at the loadLibrary method giving a Security Exception.
I tried to modify the java.policy file but I cant get how to link it to my code or how to apply the permissions in my code. I granted a permission in the java.policy file based on a specific CODEBASE.
Can someone help me and tell how I can link this policy file to my code in the applet ?
The applet that I am using is digitally signed.
How do I set the permissions to the applet ?
Please help !
Urgent
 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u have to write a security file & the allow permissions in it
to let ur applet to be run by browser.....
 
Sanket Bakshi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by maateen ashraf:
u have to write a security file & the allow permissions in it
to let ur applet to be run by browser.....


I tried to edit the java.policy file also added the grant clause based no CODEBASE. But I dont know how I can link the policy file to my applet.
Where will be the policy file be referenced ?
On many machines without JDK, I've seen that there is no such file with .policy extension. On these machines, how does my applet gets its policies ?
 
Water! People swim in water! Even tiny ads swim in water:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic