leJOS (pronounced like the Spanish word
"lejos" for "far") is a tiny (~ 16 Kb) Java-based operating system that
has been ported to the following platforms:
leJOS has been forked out of the TinyVM project.
it contains a VM for Java bytecodes and additional software to load and
run Java programs. These are some of the features offered:
- Object oriented language (Java)
- Preemptive threads (tasks)
- Arrays, including multi-dimensional ones
- Recursion
- Synchronization
- Exceptions
- Well-documented API
The features above are also provided by TinyVM. But in addition to
these, leJOS also offers
- A Windows version, which doesn't require CygWin
- A MacOSX version
- Floating point operations (doubles truncated to 32 bits)
- String constants
- Casting of longs to ints and vice versa
- Marks references in the stack (which makes it feasible to
implement garbage collection)
- Multi-program downloading
- java.lang.Math class with sin, cos, tan, atan, pow, etc.
- Additional APIs
TinyVM is still around simply as a low-footprint alternative to leJOS.
TinyVM is about 7 Kb smaller in the RCX.
|
RIS 1.0 |
RIS 1.5 |
RIS 2.0 |
RCX 1.0/2.0 |
+ |
+ |
+ |
Serial IR Tower |
+ |
+ |
- |
USB IR Tower |
- |
- |
+ |
Please download the leJOS
documentation from the same location you downloaded this distribution
from and consult the "First Steps" section of the Tutorial
contained there.
- Set your environment variable LEJOS_HOME to the
directory you installed this distribution into
- Set your environment variable RCXTTY to usb
(for USB towers) or COM1 (for serial towers); on Linux, for
USB towers RCXTTY might be required to be set to /dev/usb/legousbtower0
- On Linux, depending on the privilege settings you might need to
adjust the execution permissions in the bin folder
On Linux, you will have to build the distribution first. To do so,
switch to the build folder and run ant
.
Note that depending on the privilege settings you might need to adjust
the the execution permissions in the release folder.
Download the firmware to the RCX with firmdl
.
Check the installation by switching to the "check" folder of the
leJOS distribution and run checkDistribution.bat resp.
checkDistributionCheck.sh
.
A very simple test program will be downloaded to the RCX. After the
download has finished, press the RCX's 'RUN' button. The RCX's LCD
should print the strings "SMOKE" and "TEST".
Due to size constraints, some Java language
features have been omitted. Others just haven't been implemented yet.
Known limitations are:
Please download the leJOS documentation from
the same location you downloaded this distribution from. The
documentation contains the API docs and the tutorial. Online versions
may be retrieved from http://lejos.sourceforge.net/.
We are releasing under the Mozilla Public License
(see the LICENSE file) for now, since Kekoa Proudfoot's librcx is under
that same license, and leJOS is linked against -lrcx and -lfloat, which
are part of librcx. No changes have been made to those libraries, so
they haven't been redistributed. They are only needed if you are
planning to modify the native C source code. See docs/hacking.
Please direct feedback to the lejos-discussion
mailing list mailto:lejos-discussion@lists.sourceforge.net.
To subscribe, see http://lists.sourceforge.net/lists/listinfo/lejos-discussion.
Feel free to take a look at the Lejos
website or its project
page.