Original Post
Hello, I wrote an game using java applet technologies and am trying to integrate sound into the game. The code that loads the song is throwing an malformed // Use the absolute URL of the sound file URL oursong = new URL; oursong = "http://www.servername.net/media/sound.mp3"; AudioClip gamesound = getAudioClip(oursong); gamesound.play(); *** this code when compiled gives me the error: /tmp/4230/spaceinvader.java:186: '(' or '[' expected URL oursong = new URL; ^ now, i thought maybe i can try this and it will work... URL oursong = new URL("http://www.servername.net/media/sound.mp3"); however it does not work and gives me an different error: /tmp/8154/spaceinvader.java:186: unreported exception java.net.MalformedURLException; must be caught or declared to be thrown URL oursong = new URL("songname.mp3"); So, what am i doing wrong? Thanks