Mvn not on path error in VS Code

Hi,

I am trying to initiate fiji with imagej.init() but I get a mvn path error:
Exception has occurred: ExecutableNotFound
mvn not found on path C:\WINDOWS;…

my maven is installed in C:\Dev along with jdk 16

Can anyone help me solve this error?

I guess you would need to add C:\Dev to the path actually used by the program.
You can try to add it to the system environment variable of Windows (use the windows search bar), in the Path variable.

Or you can try to add it to sys.path if it’s python.

So I tried adding a sys.path.insert line to add mvn to the path but I still get the same error
image

maybe try
sys.path.append(r"C:\Dev")
the r before the path could avoid the slash or backslash to remove some character.

Did you try adding C:\Dev to the Path variable in environment variables otherwise ?