java local upload and download file
<p>I have a problem that about simple upload and download file. I have a local java program that allow user upload file. eg. a file call abc.txt in desktop upload to the java workspace location, ./upload. However, I use:</p>

<pre><code>boolean success = srcFile.renameTo(new File(dir, srcFile.getName()));
</code></pre>

<p>dir is the destination, the file will cut in the desktop and paste in the ./upload. But I want to copy and paste. Then, the path that store the file will store in the database. how to solve. </p>

<p>Also, after upload, is it possible download the file based on the path that store in the Database ?</p>
