r/JavaFX • • Sep 24 '26

Discussion JavaFX in the browser?

I've been waiting/hoping for years that we'd get support for JavaFX in the browser, but I think I'm finally about to give up--maybe a year or two too late. Does anyone else know of good options?

Some of my criteria:

  • Minimal rewriting.
  • Still allows for desktop versions.
  • The app allows the user to have a large data model--although I can likely do something to minimize this per user/client.
  • I don't have regular usage stats, but I do want to support 100s of people using it at a time.

I had been thinking one of the following options would give me what I want:

  • WebFX: Was promising, but only supported a few basic controls like labels & buttons--but if you want something even as common as a ComboBox, you'd have to make your own for example. Also, it is essentially just one person so it isn't something someone can rely on.
  • CheerpJ: Good for awt/swing, but recently said while they are planning to support it and have some internal prototype stuff, they don't have any timeline for it. Plus the way their of loading the whole app into a canvas like object has a delay and isn't very pretty.
  • Gluon: Recently answered me that the old prototype they had from several years back hasn't been updated and they don't plan to without support. (Which I'd be willing $$$ to do, but likely not at the scale they need by myself.)
  • JPro: I'm trying to offload most of the work to the client. I worry that having all the logic on the server and just having the graphical output on the browser is a problem if I have an app that allows for a large amount of user data and/or many users.
  • Graal to WASM to the browser: Is this possible? I can't seem to find working prototypes.

I think that's all, but if you know other options or a key aspect of the above I'm missing please post.

Edit: Why do I want this? I want folks to be able to try my app without an install. Also maybe even on their phones without me having to go through the app store approval processes.

23 Upvotes

14 comments sorted by

View all comments

Show parent comment

2

u/indyjoe Sep 24 '26

Well, my app lets users have huge data models. A world of hexagons where folks can have 20,000 'tiles' x 10,000 for example--plus more objects for other things. Sure, one solution I'm looking at is how to keep less of that in memory (and I do take steps to reduce that already) but I don't want to put this on the server. Even if I do cut back to 1/10th the memory requirements, if I grow to 10x the concurrent users, putting it on the server means I'm right back to the load I had. So I want to keep it on the server.

And the app isn't just sticking in buttons and labels on a form like a banking app or something... for example I'm calculating the geometric footprint of a house icon and the road it is being placed along, making sure the house is a percentage away from the road and rotated properly to line up with the road and not overlapping with other roads and houses. Another example is allowing for a label to be placed along a cubic curve and matching that curve. So I'm relying on a bunch of Javafx graphics libraries that I doubt are easy to swap out.

2

u/jarrod_barkley Sep 26 '26

Those are good details to put in your original post.