Jump to content

Another call to all Java programmers


DEFCON

Recommended Posts

Ok, I need to play sounds in a console app, ie one that runs in a "DOS" window. Eventually ill convert it to GUI but for right now I need to use the console.What I did is I created the following class:import java.awt.*;import java.applet.*;import javax.swing.*;public class AudioTest extends JApplet { AudioClip test= getAudioClip(getCodeBase(), "com_go.wav"); public void run() { test.play(); }It compiled fine, and im pretty sure the syntax is cool. Than, i created the following main program to test it:public class Main { public static void main(String[] args) { AudioTest test = new AudioTest(); test.run(); } }I get cannot resolve symbol errors for the AudioTest instantiation. The proper files are compiled and in the same folder so I know that isnt the problem. Does it have anything to do with the fact that the class uses elements of an applet without ever actually creating one? The AudioClip methods and constructors are all part of the applet package. Please help }
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...