Some people just know Java very well and in order to program microcontrollers it would be best choice. But microcontrollers don’t have java Virtual Machine (VM) running in them. So there is a difficulty which has to be removed. Dmitry decided to change things a bit and programmed uJ – Java VM for microcontrollers. Its written purely in C so can be used for most microcontrollers including AVR, PIC and ARM. Lots of things are already done and many are in to do list. But results are speaking for themselves.
Biggest constrains here are RAM limits, so few workarounds are implemented in order to work correctly like not coppying classes to RAM, custom stack control and other. JVM is modular so for smaller microcontrollers some features can be turned off in order to fit and leave more space for user programs. You write java programs as you would normally write for PC of course have in mind that MCU has very limited resources. Then boobloader loads bytecode from SD card and execute from Flash leaving RAM free for data. As seen on video, execution speed is really acceptable.