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的在浏览器上运行Java程序 Doppio.zip
共89个文件
java:41个
coffee:19个
sh:4个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 122 浏览量
2023-05-28
00:15:09
上传
评论
收藏 180KB ZIP 举报
温馨提示
基于java的在浏览器上运行Java程序 Doppio.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于java的在浏览器上运行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
资源评论
易小侠
- 粉丝: 6498
- 资源: 9万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 3层独栋别墅图纸编号D093-三层-13.90&20.70米-施工图.dwg
- IIS多站点管理工具,可支持同时运行多个IIS服务
- 装备换元宝-3.txt
- 三层别墅图纸编号D092-三层-17.70&19.65米-建施图.dwg
- 三层别墅图纸编号D091-三层-09.30&11.70米-建施图.dwg
- 三层别墅图纸编号D090-三层-12.00&12.70米-施工图.dwg
- 3层独栋别墅图纸编号D089-三层-11.50&14.50米- 施工图.dwg
- 3层独栋别墅建筑高度9.38米D088-三层-11.86&09.26米-施工图.dwg
- 三层别墅图纸编号D087-三层-22.00&10.50米-施工图.dwg
- maven-resources-production java.lang.NegativeArraySizeException
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功