Java program is still running. How to stop? -


I wrote an application to use sftp-client.

In the main method, I am calling a method that downloads a file from a sftp server when the file is downloaded, the program is still running. How can I stop it?

  public static zero main (string [] args) {downloadFile (); }    

Use System.exit (0) Download DownloadFile () inside the method, is complete.

SidNote : Make sure you resolve the resources and closed buffers before doing this.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -