Nobody has understood the question thus far. Please read. It's Java. Write a client program and server program. The server uses a socket connection to allow a client to supply a filename and the server will send the file contents to the client or an error message if the file does not exist. The client will create a new file with the same contents. The client will supply the filename "input.txt" to the server and create as it's output "output.txt". Don't ask the user for these names. The Server sends whatever file the Client requests. Don't put "input.txt" in the Server. The client must get the contents from the Server. It must not read input.txt directly. Do not accept arguments from the command line. One class named Server and one named Client. These must be the ONLY 2 CLASSES
Nobody has understood the question thus far.
Please read. It's Java.
Write a client program and server program. The server uses a socket connection to allow a client to supply a filename and the server will send the file contents to the client or an error message if the file does not exist. The client will create a new file with the same contents. The client will supply the filename "input.txt" to the server and create as it's output "output.txt". Don't ask the user for these names. The Server sends whatever file the Client requests. Don't put "input.txt" in the Server. The client must get the contents from the Server. It must not read input.txt directly.
Do not accept arguments from the command line.
One class named Server and one named Client. These must be the ONLY 2 CLASSES
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
I keep getting the same, incorrect answer.. I got it on my own by now, I wanted to see if anybody on here could do it as well. It shouldn't ask for a filename, the client should supply the filename input.txt (which I have in the IDE) and then the server sends the file for the client to output the same content but in another file called output.txt.
Challenging, but possible.
I might keep the subscription if someone is able to figure it out.