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 coffee-script@1.2.0
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(源码).zip
共89个文件
java:41个
coffee:19个
sh:4个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 182 浏览量
2023-02-03
13:34:01
上传
评论
收藏 177KB ZIP 举报
温馨提示
免责声明:资料部分来源于合法的互联网渠道收集和整理,部分自己学习积累成果,供大家学习参考与交流。收取的费用仅用于收集和整理资料耗费时间的酬劳。 本人尊重原创作者或出版方,资料版权归原作者或出版方所有,本人不对所涉及的版权问题或内容负法律责任。如有侵权,请举报或通知本人删除。
资源推荐
资源详情
资源评论
收起资源包目录
小程序 在浏览器上运行Java程序 Doppio(源码).zip (89个子文件)
int3-doppio-7d679cf
startup.sh 348B
tools
watch.coffee 289B
coverage.coffee 1KB
make-rt.sh 104B
preload 50KB
run_one_test.rb 1KB
cleandiff.sh 393B
browser
style.css 38B
_navbar.html 541B
javac.php 909B
node.coffee 3KB
frontend.coffee 14KB
util.coffee 408B
_about.md 6KB
ribbon.png 7KB
coffee.svg 2KB
untar.coffee 1KB
index.html 6KB
about.html 1KB
Makefile 4KB
src
opcodes.coffee 24KB
disassembler.coffee 8KB
runtime.coffee 13KB
natives.coffee 32KB
attributes.coffee 7KB
methods.coffee 9KB
util.coffee 5KB
constant_pool.coffee 5KB
types.coffee 4KB
class_file.coffee 2KB
jvm.coffee 1KB
LICENSE 1KB
webrick.rb 424B
build
.gitignore 18B
.gitmodules 103B
test
StringInternExample.java 2KB
Regex.java 445B
FloatMath.java 1KB
OMember.java 312B
special
StdIn.java 474B
foo 23B
Diff.java 32KB
ZipRead.java 772B
Chatterbot.java 20KB
Lzw.java 11KB
Sleep.java 229B
GetTime.java 379B
RegexTestHarness.java 3KB
bar 23B
DiffPrint.java 18KB
Gfx.java 175B
Exceptional.java 1KB
ClassCast.java 848B
Compare.java 234B
IntMath.java 1KB
Threading.java 2KB
MultiClass.java 231B
StaticField.java 297B
Method.java 218B
ArrayOps.java 2KB
Strings.java 1KB
OMethod.java 318B
LongMath.java 1KB
RAFile.java 470B
ArrayListOps.java 403B
FileRead.java 407B
InnerClass.java 511B
Numbers.java 213B
Wide.java 1KB
Casting.java 1KB
Switch.java 966B
HashMapOps.java 736B
DoubleMath.java 2KB
GetClass.java 734B
ConcatStrings.java 350B
GCD.java 287B
Fib.java 379B
Dup.java 1KB
console
disassembler.coffee 420B
runner.coffee 3KB
.gitignore 134B
third_party
classes
.gitignore 2B
jquery-1.7.1.min.js 92KB
underscore-min.js 12KB
bootstrap
css
bootstrap.min.css 79KB
gLong.js 22KB
ace
jquery.console.js 25KB
README.md 3KB
setup.sh 2KB
共 89 条
- 1
资源评论
大富大贵7
- 粉丝: 320
- 资源: 8869
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功