Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: query

  1. #1
    Junior Member
    Join Date
    Mar 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default query

    i am trying to .wav file using java eclipse ..

    [B]import java.io.* ;
    import sun.audio.*;
     
    public class AudioDemo{
        public static void main(String[] args) 
        		throws Exception
        {
            String F = "E:pppp.wma";
     
            InputStream in = new FileInputStream(F);
            AudioStream audioDemo = new AudioStream(in);
            AudioPlayer.player.start(audioDemo);
        }
    }[/B]

    and i am getting the following errors ...

    Exception in thread "main" java.io.FileNotFoundException: E:pppp.wma (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at AudioDemo.main(AudioDemo.java:10)




    please help iam a beginner !!!!!


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: query

    Do a Search on how to specify the path to file.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: query

    Welcome to the forum! Thanks for taking the time to learn how to post your code correctly and for including your error message with your post.

    Good luck.

  4. #4
    Member
    Join Date
    Apr 2012
    Posts
    160
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Default Re: query

    Well, it can't find the file you specified. You need to give it proper input.

Similar Threads

  1. query
    By cnshah9270 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 24th, 2014, 09:32 AM
  2. JPA many to one/one to many query
    By molleo in forum JDBC & Databases
    Replies: 0
    Last Post: March 25th, 2012, 06:40 AM
  3. From query to JTable
    By drimades in forum JDBC & Databases
    Replies: 2
    Last Post: March 7th, 2012, 10:43 AM
  4. update query is firing first then insert query
    By salmondavid88 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 8th, 2011, 10:15 AM
  5. Query
    By amol_kale in forum JDBC & Databases
    Replies: 0
    Last Post: February 18th, 2011, 07:04 AM