Help coderanch get a
new server
by contributing to the fundraiser
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Reading a .wav file - security error

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am trying to upload an applet to a web page. I originally was getting security errors when I accessed the applet from the html page, reasons being that I need to access image files and a .wav file from the applet. I then self-signed the applet for development purposes, however I am still getting security errors when I try and access my .wav file but i am able to access my image files without error? I thought that once the applet was self-signed that you would be given full security rights. Does any-one have any idea why I still cannot access my .wav file?

Thanks in advance.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What errors are you getting, exactly? And how is the code accessing the two types of files, respectively?
 
Jody Monahan
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ulf,

the error I am currently getting is "java.security.AccessControlException: access denied (java.io.FilePermission sample.wav read)".

I have imported a package called jMusic to access my .wav file and used a method from this package to read the file into the program - 'Read.audio("sample.wav");'

I access the image files by setting them to a jLabel, but I do not get the same security errors with these any more since I signed my applet.

Thanks.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make sure the jMusic jar file is signed as well.
 
Jody Monahan
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perfect, that works now! Thanks a million Ulf!
 
Goodbye moon men. Hello tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic