By default, MobaXterm does not preserve Windows PATH
environment variable: this is why you obtain
command not found
when running javac
.
In order to tell MobaXterm to preserve Windows PATH
, you just have to go to Settings --> Configuration --> Terminal tab and check Append Windows PATH environment variable option.