Search code examples
windowsbashgradlecygwin

bash: applet not found when running gradle in MobaXterm


I am currently evaluating MobaXterm as replacement for my current plain Cygwin installation on my Windows7 machine. One thing I got stuck is running 'gradle'. When executing I always get

bash: applet not found

Other people had similar issues with commands on mobile devices and routers, e.g.:

Don't know how this fits together, but solutions most times referred to changing symlinks or copying around executables of the underlying shell. Does someone know the environment dependencies of gradle for forking workers/deamons and stuff like that or even has details about the differences between a mobaXterm cygwin environment and a plain cygwin environment? Cygwin and MobaXterm use the same .bash_profile on my machine.

Thx for input! Cheers


Solution

  • after the kind response of the MobaXterm customer service, I found a solution. The problem is caused by the fact, that most of the core commands of MobaXterm (ls, cat, kill and so on) are built on busybox which is returning the mentioned error statement "bash: applet not found". (Can be reproduced with command 'busybox bash').

    According to the gradle sources, the gradle unixStartScript.txt has the following script preamble:

    #!/usr/bin/env bash
    

    I figured out that in MobaXterm the env command is represented by a sym-link to exactly busybox.exe. That seems to be followed/resolved before the actual bash command for the gradle start script. which causes

    #!/usr/bin/busybox.exe bash
    

    to be executed for environment preparation.

    Long story short: To fix this issue, make /bin/env.exe a hardlink to /bin/busybox.exe or simply copy /bin/busybox.exe and rename it to env.exe in the Windows Explorer to get gradle finally running in MobaXTerm!

    Cheers Ben