Well you can do that using jakarta HttpClient library
"Upload file HttpClient"
The article has both server side (php) and client side (java) code
you need to specify the folder on the PHP code, it is already doing through the method
move_uploaded_file ($_FILES['userfile'] ['tmp_name'], $_FILES['userfile'] ['name']);
This function checks to ensure that the file designated by $_FILES['userfile'] ['tmp_name'] is a valid upload file (meaning that it was uploaded via PHP's HTTP POST upload mechanism). If the file is valid, it will be moved to the filename given by $_FILES['userfile'] ['name'].