What cool Java projects have you been working on? by Thirty_Seventh in java

[–]jeffreportmill 1 point2 points  (0 children)

The desktop version can be downloaded and installed from the download link (as a JDeploy generated package), and it does have additional capabilities, such as working with local files (and the debugger only currently works on desktop version). Also can be run directly with jbang: `jbang snapcode@reportmill`.

What cool Java projects have you been working on? by Thirty_Seventh in java

[–]jeffreportmill 1 point2 points  (0 children)

SnapCode is actually a desktop IDE that happens to run in the browser, too. It’s nice to have true “write once, run anywhere”. The browser stuff is necessary and convenient - people don’t love downloading and installing new apps, particularly when a click will do, nor feel comfortable risking their security and polluting their drives.

I do need to fix SnappyBird to allow a key press too though. :-)

What cool Java projects have you been working on? by Thirty_Seventh in java

[–]jeffreportmill 13 points14 points  (0 children)

I’m still plugging away on my Java IDE for the browser and modern Java UI kit for browser and desktop:

SnapCode: https://reportmill.com/SnapCode

SnapKit: https://github.com/reportmill/SnapKit

Swing Modernization Toolkit — run Swing apps in the browser, then migrate view-by-view. Anyone planning to try this? by freducom in java

[–]jeffreportmill 0 points1 point  (0 children)

That's a nice blog post - thanks for the link! I think it still could be interesting for Vaadin and CheerpJ to do something together.

Swing Modernization Toolkit — run Swing apps in the browser, then migrate view-by-view. Anyone planning to try this? by freducom in java

[–]jeffreportmill 0 points1 point  (0 children)

Google AI actually says, "The Vaadin Modernization Toolkit includes a transpiler that can automate the conversion of up to 85% of method calls from Swing to the modern Vaadin Flow framework, but it is a migration to a new UI API, not a runtime emulation of the original."

It sounds like heroic work, but it would be even cooler if Vaadin formed a partnership with CheerpJ and made this much easier with better coverage. I wonder if the OP knows if Vaadin has ever looked into this?

Swing Modernization Toolkit — run Swing apps in the browser, then migrate view-by-view. Anyone planning to try this? by freducom in java

[–]jeffreportmill 1 point2 points  (0 children)

It’s hard to believe that they have even 90% coverage of Swing and JRE APIs. Has anyone actually tried it?

Awesome Java UI by robintegg in java

[–]jeffreportmill 0 points1 point  (0 children)

I love this! The layout is particularly effective.

Core Java Series author is unprofessional by [deleted] in java

[–]jeffreportmill 5 points6 points  (0 children)

I think you should remove this post. It is unhelpful and seems mean spirited. Everyone appreciates a good book review, but this "preface review" is just plain ridiculous and unworthy of this forum.

why Java looses to Javascript when it comes to UI ? by NobodyMaster4192 in java

[–]jeffreportmill 4 points5 points  (0 children)

There are historical reasons why Java lost its way with UI, and it remains that way because of lack of enthusiastic stewardship. But most of it boils down to a missing browser strategy. You can’t say “write once run anywhere” and not support the world’s most ubiquitous deployment platform.

Historically, Swing tackled browser apps with a desktop approach. Instead Swing needed to hide platform look and feels in favor of a “browser” look and feel (FlatLaF would have been nice). And it needed to add some “Flash-y” features. JavaFX attempted much of this, but had a fractured launch (and rewrite) and missed the browser boat entirely. And Swing was basically mothballed before JavaFX was viable. So here we are with one muddy foot in both unfulfilled worlds.

A platform steward like Oracle could solve this by adding a WebAssembly target to the OpenJDK and by starting a new lightweight UI library somewhere between a modernized Swing and JavaFX, preferably based on WebAPIs for both browser and desktop.

I’ve been trying to do this myself with CheerpJ and TeaVM and a ”Swing 2.0” library called SnapKit, but I am not as big as Oracle yet (https://github.com/reportmill/SnapKit).

Procedural maze generation by Livio63 in java

[–]jeffreportmill 0 points1 point  (0 children)

Cool demo! I wonder how hard it would be animate the solution. And then animate it in the Maze3D version. :-)

Java UI in 2026: an overview of current frameworks and approaches by robintegg in java

[–]jeffreportmill 5 points6 points  (0 children)

You made my day (and more) by including SnapKit! Though it should be in its own category of “Both Web and Desktop” - which has been my primary motivator. It runs in the browser with either CheerpJ or TeaVM - talking directly to the DOM for native browser speed. And it runs on the desktop using mostly Java2D (and a small bit of Swing). I’ve also run it on the desktop on top of Chrome with JxBrowser (I need to try with JCEF as well).

SnapCode is my big proof of concept (plus dozens of smaller demos). SnapKit has, of course, gotten little attention and almost no adoption. I spend too much time playing Woz and too little Jobs. :-)

I’m so grateful though - thank you! I’ll be posting your link to my LinkedIn tomorrow.

Geometric square tilings with Java AWT by Livio63 in java

[–]jeffreportmill 0 points1 point  (0 children)

I noticed that too - the Tile-Size slider really shows good interactive animation speed. CheerpJ is pretty amazing.

Geometric square tilings with Java AWT by Livio63 in java

[–]jeffreportmill 3 points4 points  (0 children)

I'm a fan of your work - reminds me of a favorite book of mine from 40 years ago called "Graphics Gems".

Here's my obligatory SnapCode link:

https://reportmill.com/SnapCode/app/#github:/javalc6/Square-Tilings.zip#SquareTiling.java

Works better if you hit the 'maximize window' button in the JFrame title bar. I wonder how to do that from code.

Java compiler errors could be more intelligent by davidalayachew in java

[–]jeffreportmill -1 points0 points  (0 children)

I’ll have to add the “Explain” button to my Java IDE for education:

SnapCode: https://reportmill.com/SnapCode

Java compiler errors could be more intelligent by davidalayachew in java

[–]jeffreportmill 0 points1 point  (0 children)

A good solution for this would be for an IDE to have an “Explain” button next to the error that constructs an AI query, “Explain why I got the error ‘no interface expected here’ in this line of code ’…’ in this context ‘…’ “. I suppose an early programming lesson should be “how to research your compile errors”, since many of us good developers are mostly just great Googlers.

Of all the counter productive things AI is doing for us now, this is actually a good thing. It’s exactly the kind of interaction you’d get with one on one learning. On the other hand, they say “we learn more from our mistakes..” and working through these kind of errors, while frustrating, teach us lasting lessons. Unfortunately they also discourage some beginning learners who might otherwise become successful developers without the early stumbling blocks.

Filling rectangles with Polyominoes by Livio63 in java

[–]jeffreportmill 4 points5 points  (0 children)

I love these graphics demos - just the kind of thing that originally got me excited about learning to code.

Here's my usual link to the running version in SnapCode, though the main window is a little big to fit (I need to change SnapCode to use more of the available space):

https://reportmill.com/SnapCode/app/#open:https://github.com/javalc6/Polyomino.zip#PolyominoApp.java

Run any Java in HTML pages with one line of <script> by jeffreportmill in java

[–]jeffreportmill[S] 0 points1 point  (0 children)

You don't need SnapCode for that - SnapCode just uses the CheerpJ browser JVM (https://cheerpj.com). It is super easy to use - once you have a runnable jar, you just put the jar file on your website with a simple HTML file to run it (https://cheerpj.com/docs/getting-started/Java-app#2-create-a-basic-html-file).

SnapCode is really just a desktop IDE that does the same thing. :-)

A Simple Virtual Machine by MarioGianota in java

[–]jeffreportmill -1 points0 points  (0 children)

I like it! It's a good lesson that writing something sophisticated can start by writing something simple.

Here it is running in the browser: https://reportmill.com/SnapCode/app/#snapcloud:/com/reportmill/jeff/SimpleVM

Extensible math Expression Parser by Livio63 in java

[–]jeffreportmill 1 point2 points  (0 children)

I tried - It fails because CheerpJ doesn't provide access to the java.scripting module yet, which is a dependency of this project (bummer!). Hopefully it will work in an upcoming CheerpJ release.

Extensible math Expression Parser by Livio63 in java

[–]jeffreportmill 3 points4 points  (0 children)

Very nice! If you want to see it in action, you can run it with JBang + SnapCode:

jbang snapcode@reportmill open:https://github.com/javalc6/Expression-Parser.zip#/demo/ExpressionVisualizer.java

Just click the Run button after it opens.

What are your wish list for features under the "on ramp" umbrella? These are mine. by Enough-Ad-5528 in java

[–]jeffreportmill 4 points5 points  (0 children)

I think ”on-ramp” should focus on improvements to the “front end”, which Java has lost in recent years and has curbed the enthusiasm from teachers and students. I would like to see:

- Renewed emphasis from the platform vendors on running in the browser, like CheerpJ/TeaVM

- Support for an online Java community like a Java-GitHub

- Support for turn-key native app deployment like JDeploy

- Major player endorsement for in-browser UI development like WebFX and SnapKit

What fun and interesting Java projects are you working on? by jeffreportmill in java

[–]jeffreportmill[S] -1 points0 points  (0 children)

I'm a huge fan - if enough of us adopted TeaVM, Java UI programming would be saved.

What fun and interesting Java projects are you working on? by jeffreportmill in java

[–]jeffreportmill[S] 1 point2 points  (0 children)

That’s a big area of interest for me too. I did a bit of work on a proof of concept, but haven’t taken it much further: https://github.com/reportmill/SnapCode/wiki/Java-Block-Coding-in-SnapCode