In addition to what Ancient Dragon said, YES java can be used to program some low level devices. As far I know it is quite used in the mobile programming and in Bluetooth and many others. Well what you need to understand here is the fact that they are all running on a specific platform. You write a program using java for a mobile device and the program get compile to generate a bytecode which is then interpreted by the Java Virtual Machine (JVM). You can clearly see that the target device should be installed with the JVM, which it does on most devices.
Now, let’s think it practically with the ATMEL AVR board. These boards come with the AVR microcontroller which has a very small amount of memory. We are speaking in KB’s. We use several techniques to improve the efficiency of the code to make use of the memory effectively. When it comes to ATMEL we are speaking of three types of memory flash, SRAM, eeprom.
The ATML AVR board doesn’t come with any RTX or RTOS with it. The only software which gets shipped is the boot loader. It doesn’t come with JVM. The JVM its self needs a specific platform to run which the AVR doesn’t support (I might be wrong).
And more over java doesn’t support pointers, and for programming an embedded system you need pointer. Since I don’t program java I am not pretty sure about it. I think its some like C++ isn’t?? But you can still program an embedded system using C++.
Hope you get an ides on why java isn’t the right language to program any level devices. Here is a small brief:
1. Java compiles the code to bytecode, not binary
2. It requires a JVM
3. It’s slow
4. Lack of pointers.
5. Needs huge amount of memory.
And remember ATMEL AVR are RISC based processor. Does JVM support RISC architecture??? From my research it seems that ARM can execute some Java bytecode!!! But I havn't persoanlly tried.
As you could see there are of lots things which you need to be considered.
ssharish