How can I get the Application path of a Project in a String variable LogPath. The LogPath is used later on to create a Log File of the Project. Am using Eclipse for coding.
USE
String AbsolutePath = new File(".").getAbsolutePath();
Explanation : File(".")
represents the current directory and getAbsoultePath()
returns absolute path to the current directory.
Hope it helps :-)
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