在 Rhino 中运行 JSLinux
为了好玩,我尝试使用 envjs 在 Rhino 中运行 JSLinux,它似乎没有抛出任何错误,也似乎不起作用。
正如这里提到的: 如何在此处本地托管网络浏览器虚拟机:http://bellard.org/jslinux/,我首先下载了所有文件并确保它可以在浏览器中正常打开。然后我开始在犀牛身上尝试一下。
交互如下:
$ rhino
Rhino 1.7 release 2 2010 01 20
js> load('env.js')
[ Envjs/1.6 (Rhino; U; Linux i386 2.6.32-31-generic-pae; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ]
js> window.location = 'emul.html';
CPU 使用率较高,然后似乎什么也没做。
有什么办法让它发挥作用吗?
For the fun of it, I tried running JSLinux in Rhino using envjs and it doesn't seem to throw any errors, nor does it seem to work.
As mentioned here: How do I locally host the webbrowser Virtual Machine here: http://bellard.org/jslinux/, I first downloaded all the files and ensured that it opens up fine in a browser. Then I got to trying it out in rhino.
Here is the interaction:
$ rhino
Rhino 1.7 release 2 2010 01 20
js> load('env.js')
[ Envjs/1.6 (Rhino; U; Linux i386 2.6.32-31-generic-pae; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ]
js> window.location = 'emul.html';
There is some high CPU usage and then it seems to be doing nothing.
Is there some way to get it to work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为Rhino不支持类型化数组,这是jslinux运行所必需的。
I think Rhino does not support Typed Arrays, which is required for jslinux to run.
有效吗?我也这样做了,但 Chrome 说:
然后我将文件复制到我的 Apache www 文件夹中,并使用 localhost 查看它,它终于可以工作了。
所以我认为你可能需要用Ajax部分修改JS文件(它使用Ajax加载3个文件,如vmlinux26.bin等)
Did it work? I did this too, but Chrome said :
then I copy the files to my Apache www folder, and view it with localhost, it finally works.
So I think that you may have to modify the JS file with the Ajax part(it use Ajax to load 3 files like vmlinux26.bin etc)