Results 1 to 2 of 2
  1. #1
    geork's Avatar
    geork is offline Member
    Join Date
    Jan 2008
    Posts
    14
    Rep Power
    0

    Default getting a music file onto File

    hey guys!
    this code isn't wrong but it can never find a file i want it to play.
    here is what i did:
    Java Code:
    File soundFile = new File("portalmusic.au");
    it won't allow me to do
    Java Code:
    File soundFile = new File("C:\Documents and Settings\Default User\My Documents\New Folder\portalmusic.au");
    please help
    he who laughs last probabely just got the joke

  2. #2
    kbyrne is offline Member
    Join Date
    Dec 2007
    Posts
    15
    Rep Power
    0

    Default

    Try the full path as you have in your second example but with 2 back slashes or a forward slash instead of the back slach you have there, this might work.

    1. File soundFile = new File("C:\\portalmusic.au");
    2. File soundFile = new File("C:/portalmusic.au");

Similar Threads

  1. count character in text file as input file
    By aNNuur in forum New To Java
    Replies: 7
    Last Post: 03-25-2010, 04:01 PM
  2. Replies: 2
    Last Post: 04-07-2009, 06:25 AM
  3. Music File Conversion
    By Dave Almighty in forum Advanced Java
    Replies: 11
    Last Post: 04-21-2008, 03:30 AM
  4. How to read a text file from a Java Archive File
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-08-2008, 09:13 AM
  5. getting a music file onto File
    By geork in forum Advanced Java
    Replies: 0
    Last Post: 02-07-2008, 07:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •