Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A JVM-based Erlang VM

This branch is even with trifork:kilim_inline

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
src
triq/src
.classpath
.gitignore
.project
LICENSE
NOTICE
OTP.launch
README
boot_otp.sh
build.xml
erl.cmd
erl.sh
fib_test.sh
run_erl_tests.sh

README

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.

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




Something went wrong with that request. Please try again.