Hi im writing a small application that requires me to enter in the name of a file in the JFileChooser of the swing class and save it. what its going to do is take that file name create a directory with the given name and create a file inside the directory and write the information to the file. i have already got all that worked out the problem is windows 7...the default open location for the JFileChooser is Documents...well documents happens to not be a physical folder but a library that points to multiple folders and so if i try and do something like this...
try and save the file hello to Documents this is what is returned with the getPath() method. C:\Users\David\Documents\hello
my program tries to create the folder hello inside the documents "folder" which of course is not a folder but a windows 7 library. the strange thing is that the mkdir() method returns true when it attempts to create the directory(C:\Users\David\Documents\hello)
here is my createDirectory method
so if i pass the value "C:\Users\David\Documents\hello into the method it prints this to the console
C:\Users\David\Documents
Creating directory hello
creation of directory successful
....but if i go into my documents library the directory is not there i have refreshed it and if i run the method again the result is the same...how can it be successful twice???
i did not clean it up yet so sorry but if you do not understand what my problem is just say so ill be happy to explain it the best i can.
google brings up almost nothing on this and i searched the forums for windows 7 libraries....and when you search google for anything that contains
java and library the only thing you get is a bunch of libraries for java....i am stuck...
i should be able to save to a windows 7 library by getting the default save location for the library why cant i do this and why does it detect the library as a directory...