DoppioVM: A JVM in Coffeescript
=================================
_Doppio_ is a double shot of espresso.
In this case it's also a JVM written in [Coffeescript](http://coffeescript.org/).
It began life as a [Mid-term project](http://plasma.cs.umass.edu/emery/grad-systems-project-1)
for [CS 691ST, Spring 2012](http://plasma.cs.umass.edu/emery/grad-systems)
at [UMass Amherst](http://www.cs.umass.edu/).
To try Doppio now, head to the [live demo page](http://int3.github.com/doppio/).
Getting & Building the Code
---------------------------
After `git clone`, do
git submodule update --init --recursive
Java programs need the Java Class Library. This generally lives in
an archive named `rt.jar`, which comes with the JRE. Note that you
do not need a JDK to run Doppio, but our automated tests do require
a Java compiler and disassembler (`javac` and `javap`, respectively).
To provide the JCL for Doppio, simply unzip the class library in
`third_party/classes`.
On OS X Lion, `rt.jar` is confusingly named `classes.jar`:
cd third_party/classes
unzip /System/Library/Frameworks/JavaVM.framework/Classes/classes.jar
We've opted to patch the `java.util.zip` package with [Jazzlib](http://jazzlib.sourceforge.net/),
a pure-Java third-party implementation.
Download [the classes][jazzlib] and copy them over the files in
`third_party/classes/java/util/zip/`.
Use [Coffeescript v1.2.0][coffee]:
npm install -g [email protected]
Run `coffee -wc */*.coffee &` to auto-generate javascript sources if you make any changes to the code.
If you want to run the console-based frontend, you'll need the `optimist` node.js library:
npm install optimist
To build the release copy of the code, you'll need [rdiscount][rdisc] as well.
Finally, to ensure that everything is set up properly, run:
make test
[coffee]: http://coffeescript.org/
[rdisc]: https://github.com/rtomayko/rdiscount
[jazzlib]: http://sourceforge.net/projects/jazzlib/files/jazzlib/0.07/jazzlib-binary-0.07-juz.zip/download
Usage
-----
To run Doppio on localhost, run `. startup.sh`, or start the browser frontend manually:
cpp -P -traditional-cpp browser/index.html index.html
ruby webrick.rb --dev
To get the optimized release version:
make release
ruby webrick.rb --release
Then point your browser to http://localhost:8000/.
The code can also be run from the console. For example:
./console/disassembler.coffee test/Println.class
./console/runner.coffee test/Println
Testing
-------
Run the automated test-runner to check runtime and disassembler output:
make test
The tests can take a while to complete, so consider running them in parallel (`make -j4`).
没有合适的资源?快使用搜索试试~ 我知道了~
在浏览器上运行Java程序 Doppio.7z
共89个文件
java:41个
coffee:19个
sh:4个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 44 浏览量
2022-07-06
14:12:33
上传
评论
收藏 133KB 7Z 举报
温馨提示
在浏览器上运行Java程序 Doppio.7z
资源推荐
资源详情
资源评论
收起资源包目录
在浏览器上运行Java程序 Doppio.7z (89个子文件)
在浏览器上运行Java程序 Doppio
int3-doppio-7d679cf
.gitmodules 103B
tools
make-rt.sh 104B
cleandiff.sh 393B
watch.coffee 289B
run_one_test.rb 1KB
coverage.coffee 1KB
preload 50KB
startup.sh 348B
test
MultiClass.java 231B
FloatMath.java 1KB
Casting.java 1KB
ArrayOps.java 2KB
HashMapOps.java 736B
Exceptional.java 1KB
Threading.java 2KB
DoubleMath.java 2KB
GCD.java 287B
StringInternExample.java 2KB
ArrayListOps.java 403B
FileRead.java 407B
LongMath.java 1KB
Switch.java 966B
Dup.java 1KB
ClassCast.java 848B
IntMath.java 1KB
StaticField.java 297B
OMethod.java 318B
RAFile.java 470B
OMember.java 312B
Method.java 218B
Wide.java 1KB
Fib.java 379B
Numbers.java 213B
Regex.java 445B
Compare.java 234B
GetClass.java 734B
special
DiffPrint.java 18KB
foo 23B
bar 23B
Chatterbot.java 20KB
Gfx.java 175B
GetTime.java 379B
ZipRead.java 772B
Sleep.java 229B
StdIn.java 474B
Diff.java 32KB
Lzw.java 11KB
RegexTestHarness.java 3KB
Strings.java 1KB
ConcatStrings.java 350B
InnerClass.java 511B
webrick.rb 424B
LICENSE 1KB
src
attributes.coffee 7KB
constant_pool.coffee 5KB
class_file.coffee 2KB
natives.coffee 32KB
util.coffee 5KB
opcodes.coffee 24KB
methods.coffee 9KB
disassembler.coffee 8KB
jvm.coffee 1KB
types.coffee 4KB
runtime.coffee 13KB
browser
untar.coffee 1KB
coffee.svg 2KB
_about.md 6KB
ribbon.png 7KB
index.html 6KB
node.coffee 3KB
util.coffee 408B
frontend.coffee 14KB
javac.php 909B
_navbar.html 541B
about.html 1KB
style.css 38B
console
runner.coffee 3KB
disassembler.coffee 420B
.gitignore 134B
third_party
bootstrap
css
bootstrap.min.css 79KB
underscore-min.js 12KB
gLong.js 22KB
jquery-1.7.1.min.js 92KB
ace
classes
.gitignore 2B
jquery.console.js 25KB
Makefile 4KB
README.md 3KB
setup.sh 2KB
build
.gitignore 18B
共 89 条
- 1
资源评论
BryanDing
- 粉丝: 299
- 资源: 5584
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功