Thanks for your reply Paul, well as you said, it does show the stack trace. But what I have understood is the following--
if you will observe f.getAbsolutePath(); this bit of code, stores the file path which includes \ this sign which is escape character! but when I replaced \ with / while running a program, then it runs properly. So, now I have a question that do I need to replace slashes every time I try to backup? If no then I'd request you to help me out with that. Also, teach me how to work with StackTrace please
On the other hand I think it's quite likely the reason is that \ is an escape character. But it would help considerably if you posted the actual code which throws the exception and not just some code which is sort of like that code. So how about if you do that?
This is the code I used and I didn't get any error..
Through \ is an escape character, here the variable store \\ . You can see when debugging..
But when you use System.out.println(path) it prints only \ as \\ refers "\". But don't think that the variable store only \...
I said that, if we write System.out.println(path) the path name will print as C:\myFolder\backUp.sql..
But actually path name is stored in the variable as C:\\myFolder\\backUp.sql.. We can see it when debugging the program.