How to append text into an existing file using java 1.4

66 Views Asked by At

I want to append into the existing text file. For that I have tried all this in plenty of way FileWriter,BufferedWriter,PrintWriter,RandomAccessFile,OutputStream,FileOutputStream,PrintStream but I can't get my desired output.

This error java.io.FileNotFoundException: could not open file '//file:/usr/backupdata/5605.txt' using mode 'a+' sucks. (I am working with ewon flexy hardware which supports javaetk 1.4 only)

1

There are 1 best solutions below

0
On

You are trying to use a url as a file name. That won’t work.

Use

/use/backupdata/5605.txt

as the file name.