问题标签 [cheerpj]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
83 浏览

applet - 对于 CheerpJ 脚本:同时使用 on same page

I began a very helpful discussion with Alessandro Pignotti (@alexp-sssup) on h

I began a very helpful discussion with Alessandro Pignotti (@alexp-sssup) on https://gitter.im/leaningtech/cheerpj?at=5f189bf76279c91f420801af

about how to get Java applet byte-code to work with CherrpJ in present-day browsers.

Hopefully the two examples referenced there in this post can serve as a guide to others who might also be struggling with getting the basics of java applet conversion with CheerpJ going.

As I mentioned there I would, I am now putting this follow-up question in stackoverflow:

I was hoping to get this page to work in which I am trying to run the same byte-code with both the <cheerjp-applet> and <applet> tags on the same page. However the page never loads properly. The best I can achieve is (with page loading seeming to hang) to force some hung script to stop, which then often ends up bringing the CheerjP button up, but I have yet to the get button in the original applet to show on the same page (in a java-enabled browser-setup where the legacy applet does work properly from this page). Sometimes the browser completely hangs before even the Cheerpj script gets to work.

So my question is: Is what I am attempting even possible, and if so what could be wrong with this first attempt of mine?

P.S.: The stackoverflow tag [cheerpj] does not exist, so the suggestion on Gitter to use it fails for me: I don't have a reputation of 1500 :( !!! Since a pretty thorough web search has revealed very little in-depth technical discussion about CheerpJ besides what's in the Gitter CheerpJ room I reference at the start of this post, I am not sure how far the attempt to move discussion in to stackoverflow is going to go.


What you are trying to achieve is not supported by CheerpJ. When CheerpJ starts it will automatically replace any <applet>, <object> or <embed> tag containing Java applets and execute them internally. The special prefixed tags, such as <cheerpj-applet> are designed to avoid accidental execution by the native plugin if installed.

We don't plan to support this use case in the future since for the vast majority of users the native Java plugin does not work anymore anyway.

You may consider using two <iframe> tags to get the behavior you want using 2 independent pages.

0 投票
1 回答
48 浏览

java - CheerpJ 可以在小程序框架外扩展 Java mouseDragged 操作吗?

此页面中,页面中小程序的 CheerpJ 转换(具有相同的字节码)似乎无法识别鼠标拖过小程序框架边界。如果可以的话,那就太好了。

这只是我的客户端设置(Linux Debian 9.2)的问题,还是其他人看到相同的行为?

非常奇怪的是,原始行为在 CheerpJ 不支持的 iPhone 浏览器上被正确转换(我在那里检查了 safari 和 firefox)。对这一事实的调查能否帮助 CheerpJ 开发人员了解如何使 MouseMotionListener 界面识别鼠标在屏幕上的任何位置拖动,而不仅仅是在小程序框架内?

也许这是不可能的,但我认为值得一问。

编辑: 将标题更改为对 CheerpJ 的负面影响较小(总的来说,我觉得这太酷了,难以置信!)并且更能反映实际问题。

0 投票
1 回答
542 浏览

java - 为什么我的 CheerpJ 网页显示加载屏幕却无法使用?

我是 CheerpJ 的新手,所以我阅读并遵循了入门教程。然而,无论我做什么,我都无法让它发挥作用。网页只会显示 CheerpJ 加载屏幕(旋转圆圈)并停留在那里。我该如何解决这个问题并让我的应用程序运行?

0 投票
0 回答
93 浏览

java - 将 Lucene 移植到 WebAssembly 的可行性

我正在探索将 Lucene 移植到 wasm 的可行性。我在 WebAssembly 方面完全没有经验,但根据我的阅读,Java 应用程序(或任何 VM 语言)似乎比非 VM 语言更具挑战性。即使 Lucene 已被移植到其他语言,我还是希望从 Java 移植它。

是否可以在没有太多工作的情况下将 Lucene(Java 版)移植到 wasm?如果是,哪个“口译员”最合适?我听说过 TeaVM、CheerpJ 和 JWebAssembly。

我应该从哪里开始?