Live data from Hacker News

Java in the Browser

jpro.one

31–40 of 113 posts

Re: Java in the Browser

#31
post #6

Java in the Browser, February 1996 edition: http://www.antipope.org/charlie/old/journo/netscape.html

Totally forgot that Netscape had email and a usenet client built-in! What nostalgia.

It's funny to me that the original use case of Java -- write-once, run-anywhere -- was eventually overtaken by Javascript, a language that had nothing at all to do with it and just wanted to steal its name for marketing. Well, guess it worked? lol

Re: Java in the Browser

#32

Anyone remember that Java applet in the nineties where there was some 2D wireframe "animal" moving in a rectangle and there was, IIRC, a tiny circle at each joint and you grab it and move it and it'd move the thing around / distort it. It was the first "serious" Java in the Browser I remember. It was all black & white. Maybe some HNer (not an HNer back then obviously) wrote it back in the days?

Back in college I had an assignment to build some kind of CRM-like system, and the professor made a point that we used Java applets, because that was the future (https://en.wikipedia.org/wiki/Write_once,_run_anywhere was all the rage).

I proposed instead learning PHP and using it for that purpose, but was laughed out of the room. Developing this was a PITA and I feel vindicated that applets faded away soon after, and PHP became part of the web-app "standard" (the LAMP acronym was started to be used around then). But I never learned PHP.

Re: Java in the Browser

#33
WASM really is the way to go for this kind of thing IMHO; I love me some Java and have for decades, but Applets were painful, especially when hooking in native code. HN seems to have killed the demo, I'll have to remember to come back later when the hoopla dies down.

Re: Java in the Browser

#34

I have looked around the website and I really have no idea what this is. I feel their marketing and doc could do with a bit more explanation if it's intended for devs. Is it like applets in that there is a runtime in the browser? Or more like GWT which compiles Java to Javascript? Also, the website which is apparently created with the technology, is incredibly slow, at least for me. And the website doesn't give usefu…

From elsewhere (site is down for me):

> jpro is a new technology which brings Java back into the browser — without Java Plugin. To achieve that, jpro runs JavaFX on the server and maps its scenegraph directly into the browser.

JavaFX is the most recent of the standard GUI libraries for Java. Seems like the Java all runs server-side, but it is effectively using a display device which is "send draw commands via a websocket to a JavaScript driver running in a browser". It's sort of an ingenious idea.

I assume the target market here is companies which already have custom desktop applications written with JavaFX, and want to make them available remotely. This is competing with remote desktop solutions, not React, wasm, etc.

Re: Java in the Browser

#35
post #29

Now someone please compile a real JRE into WASM and do it right, so I can revive applets with a simple embed. There are loads of old applets that have huge historic and technical value which are becoming harder and harder to use. Example: https://www.grc.nasa.gov/www/k-12/rocket/ienzl.html

Here you go: https://chrome.google.com/webstore/detail/cheerpj-applet-run... CheerpJ does exactly that: it ships a full JVM implementation (including Swing/AWT, Threads, ...) that runs in JS/Wasm inside your browser. The Applet Runner extension detects applets in the page and runs them through CheerpJ. The example that you list seems to work.

I know about the extensions, it's exactly how I was able to run that specific applet, but that's a high friction experience for the user. If the applet does not run it's very unlikely I will install an extension (or search for a Firefox alternative) unless I'm very motivated.

I'm thinking more like a line or two you can add to your pages hosting applets, and it would enable any modern browser to use it. Minimal friction for the webmaster, zero friction for users.

Re: Java in the Browser

#36
Well this isn't helpful for those of us that care about Java in the browser. In any case, JPro is really more "Java projected in the browser" (or like twitch/remote-desktop). It's a shortcut with significant drawbacks. I'm more a fan of TeaVM, CheerpJ, J2CL and JSweet.

https://reportmill.com/snaptea/

Re: Java in the Browser

#38

Actual Java in the browser (working, fast, passes Lighthouse) with TeaVM: https://blogs.oracle.com/javamagazine/post/java-in-the-brows... For example, try this 5-letter word game: https://frequal.com/wordii/

Nice username :)

It looks like TeaVm is still setting steady releases? It’s certainly bucking industry trends, which concerns me about maintenance.

Post reply on HN