Click here to Skip to main content
15,907,906 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Is it possible to do this in java in eclipse (installed in ubuntu)?

Implement an ftp server with multiple clients using sockets. A client should be able to access the server, choose a file and transfer it to/from the server. A client should be able to run at least the following commands:

lls (local ls on the client)
lcd (local cd on the client)
lchmod (local chmod on the client)

What I have tried:

I tried to do in java, but getting some problem, I am not sure how to run these command through java.
Updated 8-Mar-17 23:19pm

1 solution

It would be possible to do this using various programming languages.

Eclipse is an IDE (Integrated Development Environment) that supports multiple programming languages and platforms. It is a tool to help creating applications. But it is not related to what the created application is doing.

Because this is Quick Answers, your rather unspecific question can't be answered in detail here.

You should read about

  • The FTP protocol
  • Sockets and how they are used with the selected programming language
  • Decide which kind of user interface should be used by the client (GUI, command line)
  • Basic file operations (implementing the related file system commands cd, ls, chmod on server and client)

I tried to do in java, but getting some problem, I am not sure how to run these command through java.
If you have a specific problem with existing code, raise a new question, show us the code portion, and explain the problem.

The commands are not run through Java. They are selected or entered by the user in the client (e.g. a Change Directory button or entering cd <path> on the command line) and then processed by the client application. For the cd command for example you would have a variable that holds the current path. Then the cd command will check if the passed path exists and assign it to the variable upon success. Other operations will use this variable. The ls command for example will get a list of files in that directory (see File listFiles (Java Platform SE 7 )[^]).
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900