Problem on mkdir
Hello i create a jar file (netbeans) to create a program.
When i write this code:
is not working, no folder created!
File folder = new File("C:/Program Files/test/files");
when i edit the above code for Linux it works like a harm but on windows no :\
Do you already have test under Program Files?
No but i try and this
with the same result.
File folder = new File("C:/Program Files/test");
Well if the "test" directory, under which you are trying to create the "files" directory doesn't exist, than mkdir() won't work, you need to use mkdirs() which will create the entire directory structure.
lets say you wanted: c:\home\jacl\scripts\ws
but neither jacl, nor scripts folder along with ws existed under home, than using mkdirs() will create those directories for you, whereas if those directories don't exist and you use mkdir() it won't work.
Hope this helps
@f1gh: works my friend. mkdirs(); is the solution. Thank you.