• 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

reg audioclip

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
public void sayIt(Applet app){
String english = num.toEnglish();
StringTokenizer ST = new StringTokenizer(english);
do {
String token = ST.nextToken();

String audio = "http://www.cs.wustl.edu/~sck/504/current-semester/lab/lab4/audio/";
(app.getAudioClip(newURL(audio+token+".au"))).play();
}
while(ST.hasMoreTokens());
}
private URL newURL(String str)
{
URL url = null;
try {
url = new URL(str);
System.out.println("tok");
}
catch(MalformedURLException murle)
{
System.exit(0);
}
return url;
}
Hi all,
On implementing this piece of code it compiles fine.But I get a runtime error saying sun.applet.AppletSecurityException:checkconnect.networkhost1.I dont understand why this happens.Thanks.
Prabhu.R
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Applet security, an Applet can only establish a connect back to the server that initiated it. This prevents a rogue applet from performing operations on a computer which could be dangerous or comprimise the computers security.
 
reply
    Bookmark Topic Watch Topic
  • New Topic