I am using Eclipse and jdk1.7. I am making a basic program using file handling, in which an output directory inside the directory is to be made. But when I run the program,
In your case you can make use of makedirectories method in File
class.
File dir = new File("path name");
boolean isCreated = dir.mkdirs();
Here makedirectories method will create all directories that are missing in the path which the file object represent.
Source and reference is below (explained in detail).
http://www.flowerbrackets.com/create-directory-java-program/
https://docs.oracle.com/javase/6/docs/api/java/io/File.html#canWrite%28%29