Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (739)
Games in Android Showcase (224)
games submitted by our members
Games in WIP (820)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Cheerpj: convert any Java application and library to a browser-based Web app  (Read 1666 times)
0 Members and 1 Guest are viewing this topic.
Offline gouessej
« Posted 2017-07-26 15:30:59 »

Hi

Have you ever tried Cheerpj?
http://leaningtech.com/cheerpj/

It converts Java applications or libraries into JavaScript, it claims to fully support all standard Java APIs including Swing and it doesn't require access to the source code.

There is a demo here but there's a temporary server failure preventing it from working. As it's based on OpenJDK, I expect it to be released under GPL v2 with classpath exception one day.

Julien Gouesse | Personal blog | Website | Jogamp
Offline SHC
« Reply #1 - Posted 2017-07-26 18:35:00 »

I'm already using their chrome extension to run applets (I know they're dead, but college forces them). They run excellent.

https://chrome.google.com/webstore/detail/cheerpj-applet-runner-bet/bbmolahhldcbngedljfadjlognfaaein?hl=en

Offline gouessej
« Reply #2 - Posted 2017-07-26 21:39:00 »

I don't understand why I get an HTTP error 521 (= "the webserver is down, the origin web server refused the connection from Cloudflare") when trying to run the demos and when trying to use this extension.

P.S: I forced the loading of those two JS scripts and now it works:
https://cheerpjdeploy.leaningtech.com/runtime/rt.jar.sun.java2d.js
https://cheerpjdeploy.leaningtech.com/runtime/rt.jar.sun.text.js

Julien Gouesse | Personal blog | Website | Jogamp
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline KevinWorkman

« JGO Plugged Duke »


Medals: 265
Projects: 12
Exp: 12 years


HappyCoding.io - Coding Tutorials!


« Reply #3 - Posted 2017-07-27 04:06:45 »

This seems to work pretty well. This could be pretty exciting. I'd pay money if they supported embedding something like the fiddle in websites, similar to CodePen. Where'd you find out about this?

HappyCoding.io - Coding Tutorials!
Happy Coding forum - Come say hello!
Offline Stranger
« Reply #4 - Posted 2017-07-27 07:20:51 »

When i worked on web apps (2009-2010) i begin acquaint with framework called (IIRC) "vaadin". It is also Java-based for web apps.

It's just info. i think it is the one among others "incomplete" solutions.

https://en.wikipedia.org/wiki/Vaadin

Anton
Offline gouessej
« Reply #5 - Posted 2017-07-27 08:19:04 »

This seems to work pretty well. This could be pretty exciting. I'd pay money if they supported embedding something like the fiddle in websites, similar to CodePen. Where'd you find out about this?
Have you looked at this?
https://javafiddle.leaningtech.com/

The licensing/business model is still a work in progress. As they translate the source code of OpenJDK under GPL v2 with exception license, I doubt that Cheerpj can remain proprietary.

When i worked on web apps (2009-2010) i begin acquaint with framework called (IIRC) "vaadin". It is also Java-based for web apps.
It tries to bring traditional GUI development to the web like Cheerpj but it uses GWT. There are lots of incomplete attempts. For example, bck2brwsr supports JavaFX/OpenJFX and a subset of the Java SE API, there are a lot of similar APIs including TeaVM, Doppio, ...

Julien Gouesse | Personal blog | Website | Jogamp
Offline princec

« JGO Spiffy Duke »


Medals: 953
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #6 - Posted 2017-07-27 09:05:51 »

What bothers me about this is just how ass-backwards it is.

Cas Smiley

Offline nsigma
« Reply #7 - Posted 2017-07-27 09:45:33 »

When i worked on web apps (2009-2010) i begin acquaint with framework called (IIRC) "vaadin". It is also Java-based for web apps.
It tries to bring traditional GUI development to the web like Cheerpj but it uses GWT. There are lots of incomplete attempts. For example, bck2brwsr supports JavaFX/OpenJFX and a subset of the Java SE API, there are a lot of similar APIs including TeaVM, Doppio, ...

Also DukeScript is interesting which IIRC can use bck2brwsr or TeaVM in the background, although emphasis there on using the browsers native rendering.  Cheerpj seems interesting, but it doesn't half make the fan on my laptop come to life!  Wink  Interesting talk on desktop Java at JCrete including around DukeScript and a possible Electron-like framework using a Chromium frame and the JVM rather than node.js (bearing in mind client-side Java is still quite big inside industry internally).  The license of DukeScript would appear not to be ideal for this to gain similar traction though.  Undecided

Praxis LIVE - hybrid visual IDE for (live) creative coding
Offline princec

« JGO Spiffy Duke »


Medals: 953
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #8 - Posted 2017-07-27 09:51:34 »

All these efforts baffle me. Why Javascript? Seriously just why? It doesn't have to be the defacto clientside language. Someone integrate the JVM directly into Firefox please, and get rid of all the contentious APIs and sandbox it properly this time. It really can't be that hard.

Cas Smiley

Offline nsigma
« Reply #9 - Posted 2017-07-27 10:00:02 »

All these efforts baffle me. Why Javascript? Seriously just why? It doesn't have to be the defacto clientside language.

Surely you mean defacto VM, seen as most of these efforts are about not having to work in JavaScript?!  Wink  By the way, I'm mostly with you, but I think it's a lot to do with the fact that JavaFX is pretty much a dead end.  World and his dog is switching to HTML5 UI's unfortunately.

Praxis LIVE - hybrid visual IDE for (live) creative coding
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

« JGO Spiffy Duke »


Medals: 953
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #10 - Posted 2017-07-27 10:13:36 »

This is a shame as JavaFX is truly a breath of fresh air to work with, give or take certain minor issues.

Cas Smiley

Offline gouessej
« Reply #11 - Posted 2017-07-27 11:21:50 »

The version released in July is only for testing purposes, the commercial optimizer which will be released in the end of this year intends to improve a lot the performance.

As far as I know, the company behind Cheerp and Cheerpj is interested in using WebAssembly too, not only Javascript. Ideally, I'd like to be able to target any device supporting a decent HTML5 web browser with the language of my choice, preferably Java. When I need a real JRE, I prefer using a software outside the web browser.

P.S: This rudimentary example in 3D works with Cheerpj:
http://www.dgp.toronto.edu/~mjmcguff/learn/java/11-3d/
Have you succeeded in running something less trivial in 3D with it?

Julien Gouesse | Personal blog | Website | Jogamp
Offline Sickan
« Reply #12 - Posted 2017-07-27 12:02:47 »

All these efforts baffle me. Why Javascript? Seriously just why? It doesn't have to be the defacto clientside language. Someone integrate the JVM directly into Firefox please, and get rid of all the contentious APIs and sandbox it properly this time. It really can't be that hard.

Cas Smiley

It gets better. Their FAQ has this text.

"Can JavaScript code produced by Cheerp be plugged into Node.js?"
"Yes, it should. However, this has not been one of our areas of focus so far. "

People are asking if they can take their Java code and compile it to JavaScript in order to run it on the server. When Java is already on the server with better stability and performance than JS.
Offline KevinWorkman

« JGO Plugged Duke »


Medals: 265
Projects: 12
Exp: 12 years


HappyCoding.io - Coding Tutorials!


« Reply #13 - Posted 2017-07-28 01:01:22 »

Have you looked at this?
https://javafiddle.leaningtech.com/

Yeah, that's what got me excited about the idea of embedding a Java editor directly in a website. I've seen a few other online editors, but they can't handle Swing and UI stuff.

I happily pay for a CodePen account so I can do this. I'd happily pay for the ability to do this with Java.

HappyCoding.io - Coding Tutorials!
Happy Coding forum - Come say hello!
Offline KevinWorkman

« JGO Plugged Duke »


Medals: 265
Projects: 12
Exp: 12 years


HappyCoding.io - Coding Tutorials!


« Reply #14 - Posted 2017-07-28 01:02:15 »

People are asking if they can take their Java code and compile it to JavaScript in order to run it on the server. When Java is already on the server with better stability and performance than JS.

We must go deeper. Can we have a JavaScript engine inside the Java that's executing as JavaScript?

HappyCoding.io - Coding Tutorials!
Happy Coding forum - Come say hello!
Offline princec

« JGO Spiffy Duke »


Medals: 953
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #15 - Posted 2017-07-28 08:34:52 »

Well, there's Nashorn.....

Cas Smiley

Offline gouessej
« Reply #16 - Posted 2017-07-28 11:21:53 »

I'm going to use Icedtea-web with Firefox ESR 52.2 under Mageia Linux 6 to run some applets to compare with Cheerpj. Firefox non ESR >= 52 no longer supports NPAPI. Maybe the applets using 3DzzD still work.

Julien Gouesse | Personal blog | Website | Jogamp
Pages: [1]
  ignore  |  Print  
 
 

 
Ecumene (56 views)
2017-09-30 02:57:34

theagentd (79 views)
2017-09-26 18:23:31

cybrmynd (187 views)
2017-08-02 12:28:51

cybrmynd (185 views)
2017-08-02 12:19:43

cybrmynd (192 views)
2017-08-02 12:18:09

Sralse (203 views)
2017-07-25 17:13:48

Archive (759 views)
2017-04-27 17:45:51

buddyBro (892 views)
2017-04-05 03:38:00

CopyableCougar4 (1441 views)
2017-03-24 15:39:42

theagentd (1326 views)
2017-03-24 15:32:08
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!