This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
hello everyone, im new at the forum and a newbye in java,
not sure if this is the right section to post this...anyway...
im trying to upload files to my site via java using Apache common net 3.0.1 api
but cannot store file in my public directory cause i obtain "553 Can't open that file: No such file or directory"
permissions are write, read and execute, and in fact im able to delete via java from public directory all the files i want to,
but cannot store new ones
here's the code:
here's the output :
230 OK. Current restricted directory is /
----- list of file i have in my public directory------
553 Can't open that file: No such file or directory
took a look on the net but didnt found any help
can someone more skilled than me tell me where am i wrong??
Variables should start with a lowercase letter.
The variable port is declared as a String however later in the code it is parsed to an int. Why not declare it as an int?
The String variables are declared within brackets. This is unnecessary and I would remove them.
You should declare and initialize variables just before you need them. The variable fis is declared 13 lines before it is used.
Closing fis & disconnecting with the client should happen in a finally block. Otherwise in case an exception occurs the resources will not be closed.
Just a guess for fixing your problem: shouldn't this:
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.