How to get project path?

Hi, everyone

How to get project path by java code?

Have you tried something like this: https://stackoverflow.com/a/7603444/3608089 ?

-Olli

This is something I’ve been meaning to get my head around properly for yonks. It changes from system to system, server to server.

I’ve found it easiest some times writing a file to a local path then using the OS to search for it.

Here’s some light reading if you use spring.

https://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/resources.html

Thanks everyone!)