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? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -