Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

System.getProperty(“user.dir”) started to point to incorrect location

I have opened workspace on new macBook & IntelliJ Ultimate 2018.3 And most of my JAVA tests are not working

Originally when I used to run System.getProperty("user.dir") I used to get

/Users/<myUsername>/<myFolderName>/MyProjectName

But now, for same command I am getting

/Users/<myUsername>/<myFolderName>/MyProjectName/src/main/java

On top of it, my work is in /src/test/java so getting only till project name is very important for us.

How to fix this?

Comments