-4
localhostにsendTCPBytes1を実行した後、このsystem.exit(0)が実行されない理由は何ですか?Java - なぜsystem.exit(0)が実行されないのですか?
public static void killerButton() throws IOException {
String myCmd;
if (C.getOs().equals("Linux")) {
} else {
System.out.println("[bug]: forceclose");
sendTCPBytes1("forceclose", "localhost");
System.exit(0);
}
}
public static void sendTCPBytes1(String filmfr2, String localhost) throws IOException {
String downloaded = null;
Socket socket = new Socket(localhost, 58888);
DataOutputStream upload = new DataOutputStream(socket.getOutputStream());
BufferedReader download = new BufferedReader(new InputStreamReader(socket.getInputStream()));
String c = filmfr2;
upload.writeBytes(c);
upload.flush();
String get;
downloaded = download.readLine();
System.out.println("[TCP]: FROM server: >>> " + downloaded);
socket.close();
}
このコードは意味がありません。 'C'とは何ですか?どこから 'killerButton'が呼び出されましたか? – Jivings
代わりに何が起こるのですか? – oers
それが呼び出されていないことをどのように知っていますか? – Nishant