Google Chrome Java Workaround

我的梦境 提交于 2019-11-30 08:45:31

问题


Google has recently announced their intentions to remove client-side Java support from Chrome in the near future. I, a Java developer by nature, have built nearly all of my web-based applications on top of some form of Java.

As such, I am looking for a workaround for Chrome's discontinuation of Java support, without having to rewrite all of my client-side web apps from the ground-up in another language.

Furthermore, I'm searching for a workaround which does not require Chrome's built-in NPAPI workarounds, as I need basic users to be able to continue to use the applets as they are.


回答1:


The best option I'm aware of is Java Web Start (tutorial), which doesn't run in browser but does allow users to easily run a Java application you serve from a website. Oracle provides some documentation on how to migrate to JWS, but the gist is to simply replace the <applet> tags with a link to a .jnlp file with the same information the <applet> tag had. You may have to tweak Chrome's application defaults as well.

There is also the Google Web Toolkit, which isn't for applets, but does let you write Java that compiles into JavaScript.

If your applets are more integrated into the browser, unfortunately you may not be able to keep using Java. Chromium does offer some alternatives on their NPAPI deprecation page, but they're not pretty. Options include HTML5/WebGL, WebRTC, NaCL, or Chrome Extensions. The Chrome Experiments site is worth browsing if migrating off of Java becomes your best option.

Oracle's official recommendation, however, is to avoid Chrome. That's pretty heavy-handed, and won't work for most website owners, but it's worth mentioning.



来源:https://stackoverflow.com/questions/29710181/google-chrome-java-workaround

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!