Java based Microcontrollers?

Have a look at the Java-ready STM32 microcontrollers or Renesas RX.

As an alternative, you can run a stripped-down JVM on AVR/Arduino using Haiku-VM, NanoVM or uJ.

You can also write Arduino sketches in Java and cross-compile them to C using VBB.


JArduino might be a good starting point for you, as it would allow you to write Java programs that interact with an Arduino board. The Java API provided by JArduino is fully aligned with the Arduino API. Then, once you get used to the Java API, it should be easy to switch to plain Arduino programming (as pointed out, the C/C++ -based Arduino is not that far from Java, anyway). Be aware that with JArduino you do not really program the micro-controller itself (your main logic would run on your PC and the Arduino would simply be "controlled" without any advanced logic running on the board).


The difference between a language like java (or c#) and a lower level language like c or c++ is the fact that they have a virtual machine. This has many advantages, like making the application platform-independent. But it also means that each platform has to have the vm for it.

Now, microcontrollers are not uniform and vary in power, memory, and many other features. So adopting the JVM (java's virtual machine) for them is not easy even when possible. Most of the time its just impossible - most of the uc have very low memory capacity (part of what makes them cheap) - this would make fitting any general-purpose JVM there impossible, not to mention also with the application code.

I am aware of some partial-implementations of java for microcontrollers. For example "java-based" sim cards (which have a very small controller inside) are there, but they have a very limited version of java.

So basically I think your best bet to write "embedded java" (especially if you're a novice) is to work on top of microcontrolers that are basically a small fully functioning computer, that runs a proper OS that already has a JVM. Just look into one of the new "micro computer" open source projects like raspberry pi or beaglebone. Both cost around 2x of an arduino and are much more powerful.

Hope I helped.


There are Java alternatives, but I think they are costly. For example ST Microelectronics has this java IDE based on eclipse:

Java SDK

I have no experience with java on microcontrollers, but Java have many similarities (C based language) to C++ (which is more supported with microcontrollers), but it is still C that is dominating. It should be possible to learn this quite fast if you already know Java.

Arduino uses C++ and are easy to use for people inexperience with C/C++.

I suggest you also try the STM32 Java forum to see if there are users already sharing their experiences:

STM32 Java forum