How to check relative path in runtime in maven?

Viewed 22

I want to use a pathname like this:

File currDir = new File(pathName + "/" + LocalDateTime.now());

But when I compile the program on my Macbook the current path will be used on other systems (for example on my collegues Windows)

How can I get the program to generate the path of the maven's target folder at runtime in any system, if I don't want to recompile with the program with maven? I just want to copy my executable .jar file and run it!

Thank you for your answers!

0 Answers
Related