aspose file tools*
The moose likes Applets and the fly likes Reading a .wav file - security error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Reading a .wav file - security error" Watch "Reading a .wav file - security error" New topic
Author

Reading a .wav file - security error

Jody Monahan
Greenhorn

Joined: Feb 10, 2010
Posts: 20
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.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39576
    
  27
What errors are you getting, exactly? And how is the code accessing the two types of files, respectively?


Ping & DNS - updated with new look and Ping home screen widget
Jody Monahan
Greenhorn

Joined: Feb 10, 2010
Posts: 20
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
Marshal

Joined: Mar 22, 2005
Posts: 39576
    
  27
Make sure the jMusic jar file is signed as well.
Jody Monahan
Greenhorn

Joined: Feb 10, 2010
Posts: 20
Perfect, that works now! Thanks a million Ulf!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reading a .wav file - security error
 
Similar Threads
Wrestling with access control security
signing applets for internet explorer
Trouble running Applet that uses the AS400JDBCDriver
Problem Deploying Applet
JApplet Browser security issues