I have a Java application were the user can create a text file and save it wherever he wants on his computer using this code :
File txtFile = new File( path
Are you using cmd , i.e. Dos to run your file or eclipse? Whatever you are using It looks like you are running as default user. in windows 7, UAC by default blocls writimg to system.directory.
Do the following and hopefully it should work1
> If cmd.exe
> Then when you open run from start menu. Right click it, select run as administrator and then run your application
>
> If eclipse/any other IDE
>
> Close existing, right clicl eclipse,select run as admim and then run your application
>
> Hope this helps