• 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

Running audio files through java application

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i want to play a tune in java application the code in have
written for is...
<pre>
import sun.audio.*;
import java.io.*;
class au
{
public static void mian(String args[]) throws Exception
{
InputStream in = new FileInputStream("D:\\jdk1.3\\mb\\bottle-open.wav");
AudioStream as = new AudioStream(in);
AudioPlayer.player.start(as);
}
}
</pre>
it's compling successfully but giving runtime error..
Exception in thread "main" java.lang.NoSuchMethodError: main
what's wrong ??
Tnax in advance..
bhupendra
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You misspelled "main", your code reads "mian"
/Peter
 
Mahajan Bhupendra
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tankx peter it worked..
so dumb i m..

Originally posted by Peter Kristensson:
You misspelled "main", your code reads "mian"
/Peter


 
What? What, what, what? What what tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic