Results 1 to 4 of 4
  1. #1
    Alerhau's Avatar
    Alerhau is offline Senior Member
    Join Date
    Jun 2011
    Location
    Sweden
    Posts
    158
    Rep Power
    4

    Default Java, Playing Music?

    I really want to play music into my game, what is a game without music? How do I do? When I try to use the AudioPlayer & stuff I just get the message:

    Access restriction: The type AudioPlayer is not accessible due to restriction on required library C:\Program Files (x86)\Java\jre6\lib\rt.jar

    Any other possible way to do it? Or any solution?

    Thanks,
    Alex
    Currently Developing a Game Called Loaie, You Can Download It From "The Loaie Website".

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,455
    Rep Power
    20

    Default

    What's AudioPlayer? There's no class of that name in the standard JDK.

    Check out the static method of the Applet class that allows you to load an AudioClip, and the methods of that class for how to play it.

    db

  3. #3
    Alerhau's Avatar
    Alerhau is offline Senior Member
    Join Date
    Jun 2011
    Location
    Sweden
    Posts
    158
    Rep Power
    4

    Default

    Can I get any help with how I use music? Any API? Anything?

    Aex
    Currently Developing a Game Called Loaie, You Can Download It From "The Loaie Website".

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,455
    Rep Power
    20

    Default

    Not until you tell us why the help already provided wasn't useful.

    db

Similar Threads

  1. playing a video in a java application using jmf
    By 200808147 in forum Advanced Java
    Replies: 3
    Last Post: 08-17-2011, 04:01 PM
  2. playing music while program runs
    By liluma in forum New To Java
    Replies: 2
    Last Post: 05-04-2011, 06:16 PM
  3. Java crashes while playing minecraft
    By marco473 in forum New To Java
    Replies: 0
    Last Post: 03-26-2011, 10:11 PM
  4. Playing mid in java pls help
    By Hees in forum New To Java
    Replies: 5
    Last Post: 06-20-2010, 07:15 AM
  5. Music in Java Program
    By AWPtic in forum New To Java
    Replies: 1
    Last Post: 04-06-2009, 07:35 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
  •