Reputation: 165
How can I run a .jar (Java) file on a server 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?
Upvotes: 0
Views: 1618
Reputation: 706
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.
Upvotes: 0
Reputation: 22822
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.
Upvotes: 2
Reputation: 82589
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.
Upvotes: 4
Reputation: 1655
You cannot invoke non-ftp commands using ftp. Use ssh to access remote shell and invoke your commands.
Upvotes: 6