If the current directory of the application. If e.g. create a File by using
New FileOutputStream ("MyFile")
Then it's created in the ' current ' directory, which can be retrieved by calling
System.getproperty ("User.dir");
However if you change the current directory by calling native methods (very unlikely!), the property was not updated. It can be seen as the initial current directory of the application.
If you start your Java app with a batch file, and DoubleClick on the "link to it," the current directory would be the directory Where the batch file resided, but this can is changed in the link.
If you start your Java app from the command line, you already know the directory is in.
If you start your Java app from the IDE, the current directory is usually the project root, but this can usually be config Ured in the launch configuration.
In Java, what's the default location for newly created files?