首页上一页 1 下一页尾页 10 条记录 1/1页
JAVA项目开发全程实录中第十章手机象棋运行时出现问题,没人懂吗,急啊
发表在Java图书答疑
2009-04-08
是否精华
是
否
版块置顶:
是
否
正在通过存储根 d:\我的文档\j2mewtk\2.5.2\appdb\DefaultColorPhone 来运行
Running with locale: Chinese_People's Republic of China.936
Running in the identified_third_party security domain
send message:register
Success register!
message is is is:<html><head><title>Apache Tomcat/6.0.18 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - Servlet XiangQi is not available</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Servlet XiangQi is not available</u></p><p><b>description</b> <u>The requested resource (Servlet XiangQi is not available) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.18</h3></body></html>
send error return <html> is 500 or 404 error
message is is is:<html><head><title>Apache Tomcat/6.0.18 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - Servlet XiangQi is not available</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Servlet XiangQi is not available</u></p><p><b>description</b> <u>The requested resource (Servlet XiangQi is not available) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.18</h3></body></html>
send error return <html> is 500 or 404 error
send message:exit
警告: 若要避免潜在的死锁,应该在 commandAction() 处理程序之外的其他线程中执行
可能会阻塞的
操作(如网络连接)。
send message:exit
Execution completed.
3751260 bytecodes executed
644 thread switches
1670 classes in the system (including system classes)
19148 dynamic objects allocated (658648 bytes)
13 garbage collections (511548 bytes collected)
附:出问题的commandAction()代码:
public void commandAction(Command c, Displayable s)
{
if (c.getCommandType() == Command.EXIT) {
client.sendMessage("exit");
try {
destroyApp(false);
notifyDestroyed();
} catch (Exception e) {
e.printStackTrace();
}
} else if (c == okCommand) {
if (playerList.getSelectedIndex() >= 0) {
try {
String info = playerList.getString(playerList
.getSelectedIndex());
int index1 = info.indexOf("-");
int d = Integer.parseInt(info.substring(0, index1));
int index2 = info.indexOf("-", index1 + 1);
int d1 = Integer.parseInt(info
.substring(index1 + 1, index2));
int d2 = Integer.parseInt(info.substring(index2 + 1));
if (d1 == 0 || d2 == 0) {
if (d1 == 0)
trySeat = 0;
else
trySeat = 1;
tryDesk = d;
if (canvas == null)
canvas = new GameCanvas(this, client);
else
canvas.init();
client.sendMessage("take," + d + "," + trySeat);
}
} catch (Exception exc) {
System.out.println("Error parseInt");
exc.printStackTrace();
}
}
}
}
Running with locale: Chinese_People's Republic of China.936
Running in the identified_third_party security domain
send message:register
Success register!
message is is is:<html><head><title>Apache Tomcat/6.0.18 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - Servlet XiangQi is not available</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Servlet XiangQi is not available</u></p><p><b>description</b> <u>The requested resource (Servlet XiangQi is not available) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.18</h3></body></html>
send error return <html> is 500 or 404 error
message is is is:<html><head><title>Apache Tomcat/6.0.18 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - Servlet XiangQi is not available</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Servlet XiangQi is not available</u></p><p><b>description</b> <u>The requested resource (Servlet XiangQi is not available) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.18</h3></body></html>
send error return <html> is 500 or 404 error
send message:exit
警告: 若要避免潜在的死锁,应该在 commandAction() 处理程序之外的其他线程中执行
可能会阻塞的
操作(如网络连接)。
send message:exit
Execution completed.
3751260 bytecodes executed
644 thread switches
1670 classes in the system (including system classes)
19148 dynamic objects allocated (658648 bytes)
13 garbage collections (511548 bytes collected)
附:出问题的commandAction()代码:
public void commandAction(Command c, Displayable s)
{
if (c.getCommandType() == Command.EXIT) {
client.sendMessage("exit");
try {
destroyApp(false);
notifyDestroyed();
} catch (Exception e) {
e.printStackTrace();
}
} else if (c == okCommand) {
if (playerList.getSelectedIndex() >= 0) {
try {
String info = playerList.getString(playerList
.getSelectedIndex());
int index1 = info.indexOf("-");
int d = Integer.parseInt(info.substring(0, index1));
int index2 = info.indexOf("-", index1 + 1);
int d1 = Integer.parseInt(info
.substring(index1 + 1, index2));
int d2 = Integer.parseInt(info.substring(index2 + 1));
if (d1 == 0 || d2 == 0) {
if (d1 == 0)
trySeat = 0;
else
trySeat = 1;
tryDesk = d;
if (canvas == null)
canvas = new GameCanvas(this, client);
else
canvas.init();
client.sendMessage("take," + d + "," + trySeat);
}
} catch (Exception exc) {
System.out.println("Error parseInt");
exc.printStackTrace();
}
}
}
}