Microsoft
Software
Hardware
Network
Question : How to write to a file in Java?
Hello,
I want to write to the network and this is the path that I have:
http://s306a5e/wasipm/Sync
hronize
changes with Nodes.doc
when I use it for a link in html it works. but when I want to write a new file to the directory in java it does not work.
I have tried something like these:
href="
http://s306a5e/wasip
m/Synchron
ize.doc
acronym = "CBSV";
1. String filename = "
http://s306a5e/wasip/
"+ acronym + "_ServerRequest.txt";
java.io.FileNotFoundExcept
ion:
http:\s306a5e\wasip\CBSV_S
erverReque
st.txt
(The filename, directory name, or volume label syntax is incorrect.)
2. String filename = "
http:////s306a5e/wasip/
"+
acronym + "_ServerRequest.txt";
http:\s306a5e\wasip\CBSV_S
erverReque
st.txt
(The filename, directory name, or volume label syntax is incorrect.)
Thanks very much for any advice,
Answer : How to write to a file in Java?
http is a network protocol. You cannot write to a file using http protocol. To write to a file, you need to have access to the file by means of a file system, whether the file is local or remote.
Specifying http: as a file access protocol is wrong.
Random Solutions
Cropping Photos Without Changing The Aspect Ratio in Fireworks 8
Do you know a utility in Unix I could use that would compare 2 files (for ex:, files A.txt vs B.txt) and display the differences between the 2 files?
Moved a Dolpin 7 website to a new server and I get an error message.
Build and run of Actuate reports
Excel 2007 viewer error in Windows Server 2008 R2 terminal server (crash)
Cisco CallManager CRD Analysis and Reporting
Command to attach the database sql database file MS SQL 2000 desktop edition
Increment Value
delphi Run once
sql job with proxy agent failed to execute