• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Compiling Java to HTML5

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been using Java for years and am still wistful for the days of applets where you could write a simple program, post it on a webpage and let anyone on the world use it without having to worry about certificates or permissions.

The web world has moved onto HTML5 which provides most of the web readiness the applets had, but which is also much harder to program in.  I've come across some projects like DukeScript that let you write in Java and then convert that to HTML5, but that is proprietary.  Are there any open source projects around for writing in Java and then converting it to HTML5?  Are there any plans for Oracle to provide tools that do this?
 
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While I personally detest these types of tools, what you might be looking for is GWT or the related vaadin. (Though I'm not sure either is open source.)
 
Saloon Keeper
Posts: 15630
366
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mark McKay wrote:without having to worry about certificates or permissions


This is also one of the reasons why applets failed in the first place. You should always worry about certificates and permissions.
 
Bartender
Posts: 1360
39
IBM DB2 Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:

Mark McKay wrote:without having to worry about certificates or permissions


This is also one of the reasons why applets failed in the first place. You should always worry about certificates and permissions.


Another reason is that with applets you need to have a JRE installed on your PC. Imho, at that point, it would more simple to develop a traditional Java application for desktop.And distribute it via jws.
 
Saloon Keeper
Posts: 7601
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Bear said, GWT (which is open source) and its ecosystem do this. There are other Java frameworks (like Apache Wicket) that take a code-centric approach to generating an HTML client. Compared to GWT - which has a steep learning curve, IMO - it might be easier to get started with.
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want one to leverage the other, you need to decide which one is being leveraged, and which one is doing the leveraging. For example, it is possible to emit HTML5 from a Java servlet, as it is possible for a HTML5 web page to include a Java applet
 
Ranch Hand
Posts: 572
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What you should be thinking about is how browsers have changed. A lot of what Java Applets did is redundant now .
Partly due to HTML5 but to a greater degree the developments in javascript.

One issue I had with applets is that they removed the capability of playing MP3s from the Java media library . It was some sort of legal/rights issue BS. So, I could produce a video player but not an audio player on page. Lame.

HTML5 solves that problem .

I would say forget about bandaids for old technology ,it's time to move on.
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic