Despite the hardware constraints of feature phones, these custom Java versions packed impressive functionality into files that rarely exceeded 1 MB in size:
Most 240x320 Java Mario games used standard numeric keypad configurations: Jump 4 or Left Arrow: Move Left 6 or Right Arrow: Move Right 5 or Center Select: Fireball / Sprint Unofficial Clones and Homebrew Masterpieces
Graphics are typically downscaled or adapted to fit the vertical or "portrait" 240x320 screen orientation. This often means you see less of the level ahead of you compared to the original landscape view.
If you are looking for a specific version, these are the most common "clones" found on retro Java sites: Super Mario Bros 3-in-1