Run java from FTP
How can I run a .jar (Java) file on a ser开发者_Python百科ver using FTP? I use the ftp
command to enter the server, provide the IP address, username, password. Is it possible to run the java file?
You cannot invoke non-ftp commands using ftp. Use ssh to access remote shell and invoke your commands.
FTP is File Transfer Protocol. It's supposed to be used for manipulating files only.
If you need to run a Java file, I suggest you use SSH, RSH, Telnet, or some other method of getting an actual shell.
You could use FTP to transfer your jar, and then use a crontab, or any other sort of scheduled task, to actually run it. It is not possible to execute commands using FTP.
I believe you mean using ssh command to enter the server and if so
I think this might be a starting point : Can I run .jar file on Tomcat?
if not I don't think its possible.
精彩评论