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

python - how we can use ajax() in views.py in django? -

c - Performance of System() -

How to Highlight a specified route on Google Maps v2 Android? -