So I am generating data and appending it to a text file.
Instead of using FileWriter fstream = new FileWriter("addressList.txt"); I need the file path to be in another package where I have created the addressList.txt file. It says System cannot find path error.
depending on how you are running this the path may be readable but not be writable. Resources in JAR files are generally static and should be treated as readonly.
If you are trying to create a list of per user settings (addresses stored in a list) you should consider using the System objects getenv(string) method to locate the users temporary storage and copy the default file there. After copying the default file you will be free to update the file exactly as normal.
Reference:
http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#getenv(java.lang.String)