How to run the wav file

Hi
im using netbeans
i write the following code to play wav file
try {
                Player p = null;
                try {
                    p = Manager.createPlayer("myfile.wav");
                } catch (MediaException ex) {
                    ex.printStackTrace();
                } catch (IOException ex) {
                    ex.printStackTrace();
                p.start();
            } catch (MediaException ex) {
                ex.printStackTrace();
            }i try to put in the directory of the project nothing !! or src directory !!!
now where to put that wav file to run it on the emulator?
and what if i want to my program plays any wav file in the phone i mean apply my program to any wav file when i click on it?
thanks in advance.

also i try this code
InputStream is = getClass().getResourceAsStream("/myfile.wav");
            Player player = null;
            try {
                player = Manager.createPlayer(is, "audio/x-wav");
            } catch (MediaException ex) {
                ex.printStackTrace();
            } catch (IOException ex) {
                ex.printStackTrace();
            try {               
                player.start();
            } catch (MediaException ex) {
                ex.printStackTrace();
            }

Similar Messages

  • How to run the batch files

    Hi Experts,
    I am trying to implement automatic cache purging every day at specified time and i created txt file with SApurge All cache() and created bat file with nqcmd -q Analyticsweb -u username -p password -s (txt file location).
    Now i want to run this bat file daily at specified time with out executing manually may i know how to run the batch file at specified time .
    Thanks,

    There is task type as command in workflow manager if you want you can go for that during the load
    nqcmd -d "AnalyticsWeb" -u Administrator -p Administrator -s "D:\PowerCenter8.1.1\server\infa_shared\SrcFiles\1_BIPurgeCache.txt"
    Check these urls
    http://docs.oracle.com/cd/E12103_01/books/AnySched/AnySched_Scripts3.html
    http://deliverbi.blogspot.com/2011/12/purge-all-cache-from-dashboard.html

  • How to run the .jpx file?

    I have made the project using jbuilder in .jpx. how to run my project without jbuilder?

    I tried to running the demo file from JBuilder.
    I have followed the steps, but still error.
    I did the steps bellow:
    cd {my project\classes}
    C:\Program Files\JBuilder6\sampless\IPWorks\telnet\classes>C:\java\bin\java -cp . UnnamedPackage.dep2.TelnetDemo
    the error was:
    Exception in thread "main" java.lang.NoClassDefFoundError:UnnamedPackage\dep2\TelnetDemo
    and then I set CLASSPATH=C:\Program Files\JBuilder\sampless\IPWorks\telnet\classes
    the error is the same.
    when the command was C:\Program Files\JBuilder6\sampless\IPWorks\telnet\classes>C:\java\bin\java TelnetDemo
    the error was:
    Exception in thread "main" java.lang.NoClassDefFoundError: ipworks/IPWorksException
    in the classes dir, there is package cache dir and the inside of this dir there is a file UnnamedPackage.dep2
    So whats wrong with my command?

  • How to run the jsp file

    i am writing a simple jsp file
    i dont know how to run in the tomcat server
    for servlets first i created the dot class files by using the command prompt and then in the tomcat server we go the webapps folder and i copy the class files and due to xml file i run the program
    I have added the jsp-api.jar and el-api.jar files in the environment variables so what i do to run the jsp
    can anyone can tell me how to do that
    here is the program
    <%@page contentType="text/html" import="java.util.*" %>
    <!--
    Date.jsp
    -->
    <html>
    <body>
    <p> </p>
    <div align="center">
    <center>
    <table border="0" cellpadding="0" cellspacing
    ="0" width="460" bgcolor="#EEFFCA">
    <tr>
    <td width="100%"><font size="6" color
    ="#008000"> Date Example</font></td>
    </tr>
    <tr>
    <td width="100%"><b> Current Date
    and time is: <font color="#FF0000">
    <%= new java.util.Date() %>
    </font></b></td>
    </tr>
    </table>
    </center>
    </div>
    </body>
    </html>

    i am getting an http 500 error for running the jsp file
    here is the code
    <%@ page import="java.util.Date" %>
    <% Date now = new Date(); %>
    <html>
    <body>
    <p>Hello, world! It is now <%= now.toString() %>.</p>
    </body>
    </html>

  • How to run the .sql file in sql prompt?

    i want to run the .sql file in sql prompt

    Hi,
    You can navigate to the directory where the .sql files is stored and launch the SQL Prompt.
    After you login, you can run your script like this :
    SQL>@my_script.sql;
    Regards,
    Sandeep

  • How to run the java file from notepate or jedit

    i hope u will solve my probs

    JEdit has a JCompiler plugin to allow compilation and a Console plugin to allow execution.

  • How to run the JNLP from Command Line

    Hi All,
    how to run the JNLP file from the remote machine from our command line. I have requirement to run this JNLP file in java 1.4.2 version. Can any one tell me the procedure or the steps that are needed to run this file at command prompt.
    Regards,
    Prasanna.
    Edited by: VPrasanna on May 19, 2008 4:43 AM

    >
    I am getting "**java.security.AccessControlException: access denied (java.net.SocketPermission wwwgate0.mot.com:1080 connect,resolve)**" when I start the Web Start Client. >This seems like a largely separate problem to running the JNLP from the command line. It might have been better to end this thread (assign the dukes) and start a new one.
    >
    ..Can you help me in resolving this issue. >However, I suspect I can guess the problem.
    If this app. is normally hosted on wwwgate0.mot.com then it can 'phone home' to the server without further permission, but if you are running it from the command line, that might not be the codebase anymore.
    If you wish to do 'local testing' of such an app., I would recommend setting up a server like Tomcat on the local machine, and serving the test app. directly off that.
    >
    ..Its urgent...>Sun offers a number of options for urgent matters, such as support tickets. Perhaps you should look into one of those.

  • ITUnes converted all the wav files on my computer to m4a. How do I recover them?

    iTunes took it upon itself to convert all of the .wav music files on my computer to .m4a, a much lower-quality format. How can I get the .wav files back?

    Hi someonefromminnesota,
    Depending on how the tracks were imported/converted, the original .wav files may still be located in their original location, and an .m4a copy may have been added to the iTunes Library. You may find the following article helpful:
    iTunes 11 for Windows: Import music and video already on your computer
    http://support.apple.com/kb/PH12493
    iTunes: How to convert a song to a different file format
    http://support.apple.com/kb/HT1550
    Regards,
    - Brenden

  • How to run the report and show the output in excel file

    salam
    how to run the report and show the output in excel file,
    how to run the report and print the o/p via printer
    how to run the report and send the o/p via mail
    thank u all

    Hi,
    There are Parameters DESTTYPE, DESFORMAT and DESNAME. You can set these parameters to get as you want.
    1) Output in Excel File
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'FILE');
         ADD_PARAMETER(PL_ID, 'DESFORMAT', TEXT_PARAMETER, 'DELIMITED');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<file_name>.XLS');2) output to printer
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'PRINTER');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<printer_name>');3) Email - Have to configure SMTP and all. ( i didn't checked it)
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'MAIL');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<email_id>');Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • Hi  can any body please tell me how to open the .exe files in mac and why it is not supported with unarchiever app , also i am not able to run and dvd's in my mac its not accepting any cd's or dvd'd why do i need to do some settings for it ?

    Hi  can any body please tell me how to open the .exe files in mac and why it is not supported with unarchiever app , also i am not able to run and dvd's in my mac its not accepting any cd's or dvd'd why? do i need to do some pre defined  settings to run the cd's and dvd's ?

    A .exe file is a Windows executable. OS X does not run Windows programs. If you need to use .exe files then you will need to install Windows on your Mac:
    Windows on Intel Macs
    There are presently several alternatives for running Windows on Intel Macs.
    Install the Apple Boot Camp software.  Purchase Windows XP w/Service Pak2, Vista, or Windows 7.  Follow instructions in the Boot Camp documentation on installation of Boot Camp, creating Driver CD, and installing Windows.  Boot Camp enables you to boot the computer into OS X or Windows.
    Parallels Desktop for Mac and Windows XP, Vista Business, Vista Ultimate, or Windows 7.  Parallels is software virtualization that enables running Windows concurrently with OS X.
    VM Fusionand Windows XP, Vista Business, Vista Ultimate, or Windows 7.  VM Fusion is software virtualization that enables running Windows concurrently with OS X.
    CrossOver which enables running many Windows applications without having to install Windows.  The Windows applications can run concurrently with OS X.
    VirtualBox is a new Open Source freeware virtual machine such as VM Fusion and Parallels that was developed by Solaris.  It is not as fully developed for the Mac as Parallels and VM Fusion.
    Note that Parallels and VM Fusion can also run other operating systems such as Linux, Unix, OS/2, Solaris, etc.  There are performance differences between dual-boot systems and virtualization.  The latter tend to be a little slower (not much) and do not provide the video performance of the dual-boot system. See MacTech.com's Virtualization Benchmarking for comparisons of Boot Camp, Parallels, and VM Fusion. Boot Camp is only available with Leopard or Snow Leopard. Except for Crossover and a couple of similar alternatives like DarWine you must have a valid installer disc for Windows.
    You must also have an internal optical drive for installing Windows. Windows cannot be installed from an external optical drive.

  • How to play a wave file through the DAQ board?

    Hi there,
    we want to play a wave file that is saved on the harddrive via the DAQ board. Means we want to connect a amp to the analog output of the DAQ to amplify the sound and play it through a speaker.
    We couldn't find any VI that does that. Can anybody tell us how to play a wave file, or perhaps even send us a VI that can do that?
    Thanks a lot for your help
    Martin - Physical Optics Corporation

    Hi Martin,
    The only example that I could find on how to do this was using our
    older Traditional DAQ drivers version 6.9.3.  If you're using Traditional
    DAQ drivers, the vi can be found here. 
    The example reads a 8-bit mono .wav file (an example .wav file is included in the .zip file) and writes it to the analog out of your DAQ card.  I've updated the
    example to work with our newer DAQmx drivers and attached it here.  
    I hope this helps,
    Paul C.
    Message Edited by Paul C. on 08-14-2007 05:47 PM
    Attachments:
    daqmx_wav_file_to_ao_output.zip ‏27 KB

  • How to run the emca batch file

    Hello,
    I would just like to know how to run the emca batch file for a single test database on my PC with SID = ORCL1.
    Hope someone can help me.
    Thanks!

    Hi
    If you mean running EMCA as batch file and test something.
    I think the best way is to write OS level script to handle this

  • How to run the Main.kon file ?

    Hi
    I have Downloaded and Installed
    SAP Widget Foundation.
    I am trying to Create the HelloWorld Widget.
    I have Written the Main.kon file
    as described in the tutorial.
    But how to run the Main.kon file ?
    Regards
    Rajendra

    hi,
    check whether you have installed yahoo widget engine...
    Then right-click on the main.kon and choose run..
    thanks
    jaideep

  • How do I play the .wav file google mail sends me on my Iphone 5?

    I have cable phone service that sends out a .wav file of any voicemails I recieve to my e-mail account.  I use google mail on my Iphone, and cannot play the .wav file that is attached to that e-mail.  When I click on the "audio message box", it brings up a circle containing a south-west facing arrow which has a slash through it. 

    I have the latest software (6.1.4) and I can play the attachment if I go through "Mail" instead of "GMail".  I am still not certain why I have a widget called "Mail". 
    Inside the "Mail" app, there are it's own Inbox, VIP, Flagged, etc which are all in color.  Further down the list is my GMail boxes and sub-boxes.  They are all grayed out, but still funtional.
    Do I have something set up wrong causing me to be unable to play the .wav files that come to me through gmail?

  • How to run the form that is only installed on a PC and not using a server?

    Hi
    I am new to Oracle and have taken the forms class. But I do not understand how to run the form from my PC using XP windows. (Do not have access to a server).
    I have started the OC4J, made sure the listener was started, compiled the form and then when I run it, it automatically goes to the HTTP:
    ERROR: res://ieframe.dll/acr_depnx_error.htm#,http://kevin:8889/forms/frmservle
    I connected to the database correctly. I can process a report and it does nor try to access the internet. My only issue is running the form. I verified it compiled.
    Sorry for a basic question. Could someone please help, I tried reviewing other questions, but not sure if they are connecting to a server or not.
    I see webutil but is it required if I don't have a server? Thank you in advance.

    Regardless of the version, it appears that you may not have configured the Builder. Do the following:
    1. Open the Builder
    2. From the menu, select Edit > Preferences > Runtime
    3. In the box labeled "Application Server URL:", enter a local URL needed to run a form OR click the button labeled "Reset to Default". If you decide to manually enter a value, it would looks something like this:
    http://localhost:8889/forms/frmservlet
    4. In the field labeled "Web Browser Location:", enter the path and executable to your preferred browser. So for example if IE is your browser of choice the entry would most likely look like this:
    C:\Program Files\Internet Explorer\IEXPLORE.EXE
    5. Click on OK and retest.
    By the way, you can manually enter a URL in the browser. Clicking the RunForm button from the Builder is strictly optional. To run the "test" form directly from the browser enter the following into the browser's address field:
    http://localhost:8889/forms/frmservlet?form=test
    More information about Forms can be found on OTN:
    http://www.oracle.com/technology/products/forms/index.html

Maybe you are looking for

  • Can not get photos off iPhone on Mac or PC after updating to 1.1.1

    I have a windows XP machine and it doesn't see the iPhone in the 'My Computer' directory (as mentioned in a similar post) so there is no way to download pictures. When connected to my G4 Mac (running OS X 10.2.8), the iPhone does not show up but it i

  • Does CRM supports firefox and other browsers apart from IE

    Hi, can you pls share if CRM supports firefox and other browsers apart from IE. are their any specific settings to enable other browsers? any documentation would be helpful. thanks RH

  • Caption to show in Gallery

    I'm having a heck of a time getting captions to show with photos in Galleries. I try Caption, I try Titles in metadata. I believe Keywords is more of an organizing too. Caption or title doesn't seem to get then into the gallery and viewable to my cli

  • Installing Creative Cloud. Error code: A12E5

    I'm trying to install Creative Cloud on my desktop but the download won't go through and a window pops up with an Error code: A12E5. What does this mean and what can I do?

  • Modifying Process Form

    if i want to add a user defined field 'cn' to process form only and not to user profile where all i need to do the changes. This cn field will take the cn of the OID account when event gets linked(on running target recon).