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

sql - Return Function using Cursor -

javascript - Is there any way to add a new parameter to a function programmatically? -

sql server - How to use pivot in this table -