应用eclipse写Java程序时,出现如下问题,运行其中自带的例子没有问题,自己编写程序才出现这个问题,急
(Tcl-eval:)couldn'treadfile"C:Swarm-2.2-java/lib/tcl8.4//word.tcl":nosuchfileordirect...
(Tcl -eval:) couldn't read file "C:Swarm-2.2-java/lib/tcl8.4//word.tcl": no such file or directory
while executing
"source C:\Swarm-2.2-java/lib/tcl8.4//word.tcl"
while evaluating: source C:\Swarm-2.2-java/lib/tcl8.4//word.tcl
怎么结局这个问题呢 展开
while executing
"source C:\Swarm-2.2-java/lib/tcl8.4//word.tcl"
while evaluating: source C:\Swarm-2.2-java/lib/tcl8.4//word.tcl
怎么结局这个问题呢 展开
1个回答
展开全部
<pre t="code" l="java">package test;
import java.applet.AudioClip;
import java.net.MalformedURLException;
import java.net.URL;
import javax.swing.JApplet;
public class YuGiOh
{
public static AudioClip loadSound ( String filename )
{
URL url = null;
try
{
url = new URL ("file:" + filename);
}
catch (MalformedURLException e)
{}
return JApplet.newAudioClip (url);
}
public static void main ( String[] args )
{
AudioClip audioClip = loadSound ("keyboard.wav");
audioClip.play ();
}
}
import java.applet.AudioClip;
import java.net.MalformedURLException;
import java.net.URL;
import javax.swing.JApplet;
public class YuGiOh
{
public static AudioClip loadSound ( String filename )
{
URL url = null;
try
{
url = new URL ("file:" + filename);
}
catch (MalformedURLException e)
{}
return JApplet.newAudioClip (url);
}
public static void main ( String[] args )
{
AudioClip audioClip = loadSound ("keyboard.wav");
audioClip.play ();
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询