Topic: 关于JAVA编译找不到MAIN的问题 |
Print this page |
1.关于JAVA编译找不到MAIN的问题 | Copy to clipboard |
Posted by: mashengguo Posted on: 2003-12-07 23:19 我写了个JAVA 程序,编译的时候找不到main。这是源代码: import java.net.*; import java.io.*; class SerSocket { ServerSocket serversocket; Socket clientsocket; public static void main(String[] args) { BufferedReader br; BufferedWriter bw; String inString,outString; try{ serversocket=new ServerSocket(8000); clientsocket=serversocket.accept();//负责返回一个SOCKET对象 br=new BufferedReader(new InputStreamReader(clientsocket.getInputStream())); bw=new BufferedWriter(new OutputStreamWriter(clientsocket.getOutputStream())); inString=br.readLine(); outString="You have said:"+inString; bw.write(outString); bw.flush(); br.close(); bw.close(); serversocket.close(); clientsocket.close(); } catch(Exception e){System.out.println;} } } |
2.Re:关于JAVA编译找不到MAIN的问题 [Re: mashengguo] | Copy to clipboard |
Posted by: reddream Posted on: 2003-12-08 08:21 Should be public class SerSocket ... java SerSocket |
3.Re:关于JAVA编译找不到MAIN的问题 [Re: mashengguo] | Copy to clipboard |
Posted by: jameszhang Posted on: 2003-12-08 09:27 你的JAVA文件名是什么? |
4.Re:关于JAVA编译找不到MAIN的问题 [Re: mashengguo] | Copy to clipboard |
Posted by: RichardCheung Posted on: 2003-12-08 12:00 必须有一个主类,而且只能有一个主类````` |
5.Re:关于JAVA编译找不到MAIN的问题 [Re: mashengguo] | Copy to clipboard |
Posted by: davidwangwxw Posted on: 2003-12-16 12:15 静态方法不能调用非静态变量 |
6.Re:关于JAVA编译找不到MAIN的问题 [Re: mashengguo] | Copy to clipboard |
Posted by: kingwzb Posted on: 2003-12-16 20:26 错误多多呀 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |