Erjang - a JVM-based Erlang VM Wiki Pages: www.erjang.org Discussion: http://groups.google.com/group/erjang Source: http://github.com/krestenkrab/erjang -- BUILDING You should be able to do "ant jar", and thereafter run the sample like this: prompt% ant jar ... prompt% ./erl.sh -pa ./src/main/erl -noshell -s ring main .... {1267,799627,843000} Starting message, cycles=10000 {1267,799638,52000} Around ring 10000 times 10000 == 10000 ... stop Start={1267,799628,58000} Stop={1267,799638,54000} Elapsed=9996000us {1267,799638,69000} Starting message, cycles=10000 {1267,799647,837000} Around ring 10000 times 10000 == 10000 ... stop Start={1267,799638,74000} Stop={1267,799647,838000} Elapsed=9764000us {1267,799647,847000} Starting message, cycles=10000 {1267,799657,644000} Around ring 10000 times 10000 == 10000 ... stop Start={1267,799647,851000} Stop={1267,799657,649000} Elapsed=9798000us {1267,799657,662000} Starting message, cycles=10000 {1267,799667,790000} Around ring 10000 times 10000 == 10000 ... stop Start={1267,799657,665000} Stop={1267,799667,792000} Elapsed=10127000us {1267,799667,806000} Starting message, cycles=10000 {1267,799677,486000} Around ring 10000 times 10000 == 10000 ... stop Start={1267,799667,809000} Stop={1267,799677,488000} Elapsed=9679000us You can compare this to a similar run for "BEAM" by running prompt% erl -pa ./src/main/erl -noshell -s ring main The source for the few samples are in src/main/erl. -- RUNNING When running, it writes files named ".erj/${module}-${CRC}.jar". These files are written in response to erlang:load_module(Module,Binary). These files also serve as a cache of files translated from beam -> jar. If something goes astray, it may help to remove the .erj directory forcing Erjang to recompile next time it runs. -- PREREQUISITES I have only been testing this with Erlang/OTP R13B02. If you run with a different erts (Erlang runtime system), then you can use the +e <ErsVsn> flag, like this: ./erl.sh +e 5.7.5 To tun with erts-5.7.5. To run the tests, you need an OTP distribution, and go edit src/test/java/erjang/AllTests.java to tell it where your OTP_HOME is. Cheers! Kresten Krab Thorup krab _at_ trifork dot com