Just right-click on the folder, and select properties. Go to Customize and then click on the Change Icon button. After that, select the blank icon or the icon without any picture and click on OK. After doing this, you are finally going to be having a folder without any name nor any icon.
A new empty file with the required abstract path name can be created using the method java. io. File.
In Java, we can use the File object to create a new folder or directory. The File class of Java provide a way through which we can make or create a directory or folder. We use the mkdir() method of the File class to create a new folder.
If the src folder is empty it means there is no java files in project, so you can't run that project.
Looks file you use the .mkdirs()
method on a File
object: http://www.roseindia.net/java/beginners/java-create-directory.shtml
// Create a directory; all non-existent ancestor directories are
// automatically created
success = (new File("../potentially/long/pathname/without/all/dirs")).mkdirs();
if (!success) {
// Directory creation failed
}
You can create folder using the following Java code:
File dir = new File("nameoffolder");
dir.mkdir();
By executing above you will have folder 'nameoffolder' in current folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With