8 ms·
CheerpJ Applet Viewer – Runs Java applets without a local Java installation
- TekMol 9y agoThe title seems a bit strange to me: "without JVM" - providing what is necessary to run Java is a JVM in my book. That you compile Java to JavaScipt is just an implementation detail, isn't it? EDIT: Yeah, ok. It emphasises that you don't need an extra JVM on your computer. "fully client side" - isn't that how Java Applets always have been executed? "no plugins" - Not sure what you mean by "plugin". Installing an extension does not match that? Hmm.. ok, ok I am nitpicking :) Could you instead provide a bookmarklet that runs Java Applets on websites? That would be something I would use. I would not install an extension because I don't want your code to run outside of the browser sandbox.
- diggan 9y agoSeems the extension converts Java to JavaScript before executing anything, that's why it gets by without a JVM.
- ryanpetrich 9y agoAh, so it's merely a machine that implements a virtual version of the Java runtime.
- tootie 9y ago"Our unique Java-to-JavaScript technology converts Java to JavaScript on the fly directly on the browser." Seems like a transpiler. But it would have to be a half-baked JVM written in JavaScript under the hood.
- Klathmon 9y agoThe description provides some clarity (can't fit everything in a title!) "without JVM" means you don't need a "standalone" client-side JVM install (outside of this extension). "fully client side" means it's not doing something like "execution on a server, streamed video to the client" and "no plugins" means it doesn't require a "chrome plugin". In chrome plugins != extensions. Flash and java were plugins, extensions are written in JS.
- unclebucknasty 9y agoDoes sound strange at a glance, but I think these are implicit references to what we traditionally know about applets: they generally required the full JRE JVM install/plugin. So, it's advertising that this is no longer required, and that they haven't achieved it with any server-side tricks.
- dbh937 9y ago"no plugins" probably means that the extension doesn't install native code, but is written in JavaScript that's run in the browser.
- apignotti 9y agoThe extension itself is actually minimal, all the real work happens inside the page by injecting a script. Also the extension is not invasive as it asks for permission on a site by site basis.
- johansch 9y agoThese demos allow you to test this tech without installing an extension: http://www.leaningtech.com/cheerpj/demos/ http://www.leaningtech.com/cheerpj/demos/ It's kinda fun to see Swing again...
- mal34 9y agofirst CheerpJ demo will download of approximately 25 MB. !!
- unclebucknasty 9y agoFunny. Just posted about Swing yesterday and, in particular, as a solution to what current JS frameworks are trying to achieve: https://news.ycombinator.com/item?id=14581407 https://news.ycombinator.com/item?id=14581407 I'm not advocating traditional applets, but the Swing paradigm is actually near-perfect for the job.
- TallGuyShort 9y agoI've been aching for a solution to run Webex on current browsers on Linux. Sadly, this doesn't appear to do the trick.
- josefx 9y agoAs far as I know Webex always needed the Oracle JVM and wouldn't run on anything else, so that would have been rather surprising.
- module0000 9y agoFor what it's worth - you can do this with firefox(others may work, but it's my go-to for this process). Short summary of the steps: 1) First try to join a webex, let firefox download and install the webex plugin 2) Look in ~/.webex, you'll see a bunch of 32-bit binaries 3) `ldd` on the 32-bit binaries, and install the 32-bit requirements to satisfy the missing dependencies. 4) Restart firefox, join the webex, you're done. The big issue is that the plugin they download assumes you are using a 32-bit OS, and will fail to load without much in the way of meaningful error messages.
- colordrops 9y agoI'm using a recently released HTML5 version of WebEx on Linux at work now. It does (did?) have a stupid bug though. When you enter your name, you have to click the button to enter the room. If you just hit enter with the keyboard it would still try to load the Java version.
- reza_n 9y agoSame, I just move the meeting to something Linux compatible like Hangouts or GotoMeeting. Also, if not presenting, Webex android/iphone client is also an option.
- brentjanderson 9y agoFrom the description, it sounds like perhaps they transpile Java Bytecode to Javascript? > Based on CheerpJ, a solution to convert Java applications to JavaScript, the Applet Viewer extension compiles the Java applet on the fly, without relying on any remote server.
- kodablah 9y agoYes, from the FAQ: "The CheerpJ compiler, based on LLVM/Clang, as well as on parts of Cheerp, converts Java bytecode into JavaScript, without requiring the Java source. CheerpJ can be invoked on whole Java archives (.jar) or on single .class files, and generates a .jar.js (or .js) output. " We've seen this plenty with GWT and the likes, but this one is self-hosted in the browser to support dynamic class loading. As with Emscripten, the real struggle is the stdlib, not the translation. As an alternative, I would recommend people look at TeaVM[0]. 0 - https://github.com/konsoletyper/teavm https://github.com/konsoletyper/teavm
- azakai 9y agoAnother related project is Doppio, an open source JVM written in TypeScript, https://github.com/plasma-umass/doppio https://github.com/plasma-umass/doppio
- kitd 9y ago> You are 2 clicks away from the applets you need or you love. lol, so they're mutually exclusive?
- yellowapple 9y agoGenerally yes. I've yet to encounter a Java applet that I've both needed and loved at the same time. Every applet I've used has either been some awesome but impractical/silly toy (e.g. science demo toys) or some mission-critical but painful-to-use monstrosity (like ADP eTime or my work's HVAC interface).
- jcwayne 9y agoThat's been my experience.
- atemerev 9y agoNo, otherwise it'd be "you need xor you love".
- jdc0589 9y agocan't wait to try running Runescape with this and watch my CPU explode.
- flow93 9y agothis lol
- gizmogwai 9y agoThe only, and still unmatched, advantage of using applets was having access to external devices, such as smart card readers, in order to be used with eID, for example. This is not possible with this plugin. The only interest would be for some old applets you don't have sources anymore and aren't techie enough to use a decompiler to retrieve some codebase to work with.
- spankalee 9y agoWeb USB: https://developers.google.com/web/updates/2016/03/access-usb-devices-on-the-web https://developers.google.com/web/updates/2016/03/access-usb... WebB Web Bluetooth: https://developers.google.com/web/updates/2015/07/interact-with-ble-devices-on-the-web https://developers.google.com/web/updates/2015/07/interact-w... and Web NFC: https://w3c.github.io/web-nfc/ https://w3c.github.io/web-nfc/ should start making a dent in hardware access.
- admax88q 9y agoIn 10 more years we'll almost be where applets where 10 years ago! Except now in a slower single threaded language with a worse GUI toolkit.
- skybrian 9y agoI don't know about that. Modern HTML apps can easily render things that Swing never could back then.
- yoz-y 9y agoIf I had to pick only one flaw in Java. It would be its horrible and ugly GUI. I mean... it managed to make anything ugly. I agree with the broader point that web tech is basically playing catchup with years of lag compared to existing technologies. However the one benefit we get from all this is real security and true universal runtime.
- lotsofcows 9y ago
- y0ghur7_xxx 9y agothe only reason we use a java applet, is because javascript has no api to access a smartcard reader. unfortunately this project can not solve that use case.
- finchisko 9y agothis can change soon. https://wicg.github.io/webusb/ https://wicg.github.io/webusb/
- apignotti 9y agoMore information on the technology behind this can be found here: http://blog.leaningtech.com/2017/06/announcing-cheerpj-java-compiler-for-webapps.html http://blog.leaningtech.com/2017/06/announcing-cheerpj-java-...
- xg15 9y agoThe demo takes a minute to initialize (firefox, windows 10, surface 3 pro) then shows a window that ignores all UI conventions. Yup, they got the applet experience nailed down perfectly :) (Somewhat joking. The technology behind it is still extremely impressive)
- 120bits 9y agoI wanted to try this out, since, my company still has some legacy code and we use swing/applet as our frontend. It has worked very well so far, but after NPAPI support has been dropped from Chrome and Firefox it getting tough to keep that as our frontend now. We have slightly moved to HTML5. I installed and went to https://www.java.com/verify/ https://www.java.com/verify/ on google chrome and still says "The Chrome browser does not support NPAPI plug-ins and therefore will not run all Java content. Switch to a different browser (Internet Explorer or Safari on Mac) to run the Java plug-in." Am I missing something here?
- apignotti 9y agoClick on the CheerpJ extension icon and and then click "Run Applets". Sites such as that one dynamically check if the Java plugin is available and CheerpJ needs to refresh the page to properly spoof the plugin availability.
- Recursing 9y agoYou have to click on the extension and on "Run Applets" after loading the page, it works fine for me («Congratulations! You have the recommended Java installed (1.8.0_300).»)
- jaimex2 9y agoNeat, gives Chromebooks some new options. I have a few things I'd like to try, like Dell iDrac.
- roywiggins 9y agoIt doesn't seem to detect applets loaded in <object> tags, only <applet> tags, and then only the first applet embedded on the page, which seems like an oversight. Specifically, this one: http://www.morenaments.de/euc/applet http://www.morenaments.de/euc/applet
- apignotti 9y agoThese are definitely bugs, please report them on the issue tracker here: https://github.com/leaningtech/cheerpj-appletrunner/issues https://github.com/leaningtech/cheerpj-appletrunner/issues
- le-mark 9y agoOne of notch's old java 4k games, fails to start? Cpu is pegged on a core, and the heap keeps growing. Notch used to write his own bytecode for these, would be a good test case me thinks! More of his games on this site. http://www.java4k.com/index.php?action=games&method=view&gid=288 http://www.java4k.com/index.php?action=games&method=view&gid...
- finchisko 9y agoAwesome piece of tech. However I guess this will not stay free forever.
- gadders 9y agoI currently have to use IE10 to log in to my work's Citrix remote access solution as it is the only browser that still supports Java. I wonder if this extension would work for that?
- Perignon 9y agoJava applets? 2005 called, they want their hackernews posts back.
- MrMorden 9y agoSadly, vendors are still shipping hardware that requires Java applets for critical functionality. (ASRock, I'm looking at you.)
- stuaxo 9y agoAbout time :) Lots of fun and useful things were applets (OK, mostly fun things). It would be a shame to lose all of them (similarly for J2ME).
- hackinthebochs 9y agoAnd projects like this is why I use chrome. The gulf between firefox and chrome continues to expand.
- deleted 9y ago[deleted]
- bobsgame 9y agoI want to make a browser plugin that runs a full Linux VM with OpenJDK and runs Java applications sandboxed in its own full OS. That way you get the full Java capabilities and can pass through hardware that you want, or maybe give it permissions like mobile apps. Could also run C#, native code, etc.
- exabrial 9y agoApplets were/are a terrible idea, but they started us down a path of improvement that's lead us to where we're at today with browser technology. I really wish we had a powerful virtual machine like the JVM in our browsers though... Client-side frameworks are making the web much slower and are eating battery life. Web assembly is a step in the right direction, but the "not invented here syndrome" makes my head hurt.
- flohofwoe 9y agoWhat are features of the Javascript VM in current browsers that make it less powerful than the Java VM?
- ianopolous 9y agoSingle threaded, no 64 bit integers.
- wbl 9y agoFirefox lags with GC due to a painful decision to permit C to point to JS directly.
- hackcasual 9y agoRunning the JVM in the browser had a horrible security track record. WebAssembly operates within the well defined parameters of the pretty decent for security Javascript sandbox. I'm not sure NIH is particularly fair, especially considering the relatively quick wide spread adoption WASM has seen.
- hamandcheese 9y agoA similar project is shumway, an implementation of Flash with JavaScript: https://github.com/mozilla/shumway https://github.com/mozilla/shumway
- smacktoward 9y agoShumway development has been discontinued. See https://bugzilla.mozilla.org/describecomponents.cgi?product=Firefox%20Graveyard https://bugzilla.mozilla.org/describecomponents.cgi?product=...
- firman 9y agoI hope there is ActiveX runner, so I did not rely on IE in Windows.
- TeeWEE 9y agoLets start running android apps in the browser!
- still_grokking 9y agoI like it. Java is slow again! /s