How to find absolute path within a project
I have a mavenproject (java).
Now there is a file in that project. A file, NOT an object of the class
File. (txt, actually) In the end, this file will be bundled within the
jar. I want to use that during the execution of the project and I do need
the absolute path to that file. Of course that differs depending on the
computer I am using. If we were talking about a File object, I would
simply find the absolutepath by using myfile.getAbsolutePath.
Is there also a way to find the path in that case?
No comments:
Post a Comment