On Windows, we can easily transfer files between the PC and the BBB through SecureShell File Transfer Client. However, in Linux, we will have to use the terminal program Secure Copy or SCP that’s built-in.
Overall, the scp command for copying to a computer (aka use the to computer’s username and ip) is:
In your program, you might want to acquire files from the internet for purposes such as update, additional resources, web image gallery… so here’s a modified version of the codes I found on stackoverflow.com that you can just copy and paste into your Java program. Just supply the URL for path and the file name in filename.