Skip to content
Advertisement

dot dot(..) pathing doesnt work on java new file with linux running jenkins

JavaScript

I have this in a maven build on Jenkins. It’s being used to generate files. It works when building on my local machine(windows 7) but doesn’t work when i run it on Linux. It looks like it’s taking the .. as a literal folder path and not going back a directory. The error is:

JavaScript

Advertisement

Answer

Using basedir.getParent() works.

Advertisement