News for hackers. Stuff that matters.
Re:Oracle deprecating Java applets in Java 9 by zymhan on Wednesday January 27, 2016 @08:42PM (#10985409)
Imagine all of the 1-2 decade old applets that no one will care enough about to update. I'm thinking of little physics simulators you'd find on a professor's web page to simulate projectile motion and such.
Re:Oracle deprecating Java applets in Java 9 by jcranmer on Wednesday January 27, 2016 @09:55PM (#10985823)
Actually, a lot of the useful things like ADT illustrations tend to be written as ancient Java applets as well.

On the other hand, the Java bytecode is simple enough that it shouldn't be too much work to write an emulator in JS, and, as most of Java is written in Java, all one really needs to write around that is a shell for the AWT and maybe a bit of class/string functionality to get the viewer working. Threading and I/O would be a truly nasty pain, but you could probably bypass most of that.

I'd be more surprised if there weren't already some attempts to work on this.

Re:Oracle deprecating Java applets in Java 9 by renaudpawlak on Thursday January 28, 2016 @01:15AM (#10986637)
Yes there is: https://dukescript.com/. But you can also think of transpiled approaches such as GWT. Personally my favorite is JSweet (http://www.jsweet.org) because you get to write actual JavaScript in Java, and I find that the canvas API and other SVG or WebGL APIs allow much more things that what was done in Java.
Re:Oracle deprecating Java applets in Java 9 by tomjen3 on Thursday January 28, 2016 @12:40AM (#10986520)
The problem is that the graphics class allowed you to do things that can only be done in canvas with direct pixel manipulation, which is too slow for interactive programs.
Re:Oracle deprecating Java applets in Java 9 by yincrash on Thursday January 28, 2016 @01:43AM (#10986734)
You can emulate a 2d canvas in webgl.
Re:Oracle deprecating Java applets in Java 9 by tomjen3 on Thursday January 28, 2016 @02:22PM (#10990510)
That requires webgl to be widely available.
Re:Oracle deprecating Java applets in Java 9 by sand500 on Thursday January 28, 2016 @01:12AM (#10986628)
How about web assembly?
Re:Oracle deprecating Java applets in Java 9 by tomjen3 on Thursday January 28, 2016 @02:24PM (#10990521)
A subset of javascript can't do things you already couldn't do in javascript and I doubt their canvas operations are optimized that much (e.g you have to traverse all the pixels and access all their neighbors to write a blur filter, no matter how you do it).
Re:Oracle deprecating Java applets in Java 9 by ianlevesque on Wednesday January 27, 2016 @08:54PM (#10985478)
Maybe we just need a shumway [1] equivalent for Java Applets.

1. https://mozilla.github.io/shumway/

Re:Oracle deprecating Java applets in Java 9 by cpeterso on Wednesday January 27, 2016 @10:03PM (#10985862)
Mozilla had been working on a "j2me.js" VM called PluotSorbet. The primary use case was to host J2ME apps on Firefox OS.

https://github.com/mozilla/pluotsorbet

Re:Oracle deprecating Java applets in Java 9 by ianlevesque on Thursday January 28, 2016 @06:29AM (#10987576)
Delightfully bizarre. I guess this would have been for SIM card apps?
Re:Oracle deprecating Java applets in Java 9 by cpeterso on Thursday January 28, 2016 @08:12PM (#10992807)
WhatsApp is a J2ME app and PluotSorbet was able to play it. :)