S
sillyjohn
Unregistered / Unconfirmed
GUEST, unregistred user!
我在编译一个例子时出现以下错误:
play.java:94: Exception java.net.MalformedURLException must be caught,
or it must be declared in the throws clause of this method.
getAppletContext().showDocument(
new URL(getCodeBase(),getParameter("source")));
^
play.java:96: Class MalformedURLEXception not found.
catch(MalformedURLEXception e){
^
Note: play.java uses or overrides a deprecated API.
Recompile with "-deprecation" for details.
原代码如下:
public boolean action(Event evt,Object arg){
if (evt.target instanceof Button){
try{
getAppletContext().showDocument(
new URL(getCodeBase(),getParameter("source")));
}
catch(MalformedURLEXception e){
e.parintStackTrace();}
return(true);
}
return(false);
}
我想问问
1)
Class MalformedURLEXception not found.是因为没IMPORT还是我的环境中没有?
2)如何解决?
3)play.java uses or overrides a deprecated API.
Recompile with "-deprecation" for details.
什么意思?
初学JAVA。问题多多。100分是少了点,但要留待以后问*—)
谢谢!
play.java:94: Exception java.net.MalformedURLException must be caught,
or it must be declared in the throws clause of this method.
getAppletContext().showDocument(
new URL(getCodeBase(),getParameter("source")));
^
play.java:96: Class MalformedURLEXception not found.
catch(MalformedURLEXception e){
^
Note: play.java uses or overrides a deprecated API.
Recompile with "-deprecation" for details.
原代码如下:
public boolean action(Event evt,Object arg){
if (evt.target instanceof Button){
try{
getAppletContext().showDocument(
new URL(getCodeBase(),getParameter("source")));
}
catch(MalformedURLEXception e){
e.parintStackTrace();}
return(true);
}
return(false);
}
我想问问
1)
Class MalformedURLEXception not found.是因为没IMPORT还是我的环境中没有?
2)如何解决?
3)play.java uses or overrides a deprecated API.
Recompile with "-deprecation" for details.
什么意思?
初学JAVA。问题多多。100分是少了点,但要留待以后问*—)
谢谢!