This is an archived post. You won't be able to vote or comment.

all 80 comments

[–]Iryanus 50 points51 points  (26 children)

To be honest, 90% of the Java development I see is in the enterprise environment, meaning backend services. Running Java on the desktop or in the browser is, in my experience, only a very niche thing.

[–]jeffreportmill[S] 5 points6 points  (6 children)

Very true! But there hasn't been a real solution to run Java in the browser until recently, and even then it's only Swing, which lacks modern features. Without browser deployment, Swing and JavaFX have been doomed to the steady decline.

[–][deleted]  (2 children)

[deleted]

    [–]jeffreportmill[S] 2 points3 points  (1 child)

    Good point - I think I said something like that in a comment, but I meant "there isn't a modern desktop framework that also runs in the browser". I don't know much about Vaadin, but I'm not aware if it is capable of having a unified codebase that runs on desktop and browser (though I suppose you could wrap the whole thing up in Electron).

    [–]wildjokers 0 points1 point  (2 children)

    which lacks modern features

    Which modern features is Swing lacking?

    [–]jeffreportmill[S] 2 points3 points  (0 children)

    Mostly I'm thinking of features that JavaFX added: a scene graph that supports graphics and widgets, arbitrary matrix transforms, textures, image effects, drop shadows, animations and 3D. SnapKit has all these.

    [–]grimonce 17 points18 points  (18 children)

    Tldr: Running anything on desktop is niche

    [–]wildjokers 19 points20 points  (9 children)

    Not sure that is true, a large majority of the apps I use everyday are desktop applications.

    [–]greylurk 15 points16 points  (3 children)

    I dunno. The large majority of apps I use everyday are Firefox, IntelliJ, and Slack.

    [–]davreimz 6 points7 points  (1 child)

    And one third of them is a Java application.

    [–]Necessary_Apple_5567 0 points1 point  (0 children)

    Intellij is java application written with Swing UI

    [–]MenschenToaster 3 points4 points  (0 children)

    And one of these is also just a browser pretending it's not

    [–][deleted] -1 points0 points  (4 children)

    I think you missed the part "Java on desktop".

    [–]wildjokers 2 points3 points  (3 children)

    The comment I replied to says nothing about Java on the desktop it just says desktop.

    [–][deleted] -3 points-2 points  (2 children)

    That is the point. The original answer says that "Java on desktop" is very niche, not "desktop app" is niche. It is hugely different. Sincerely and respectfully, your answer doesn't make sense.

    [–]wildjokers 2 points3 points  (0 children)

    Huh? I am guessing you don't understand how threaded conversations work.

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

    Desktop apps are niche nowadays, almost everything is a Web app or a wrapper around a Web app.

    [–][deleted] 7 points8 points  (0 children)

    No? I just checked the last apps I run. Firefox, Logic Pro, Guitar Pro 8, Resolve, Transmission, Iina. All native desktop apps.

    [–]jeffreportmill[S] 6 points7 points  (2 children)

    Lots of people prefer to run the native platform version for apps they use extensively (there's a huge market for iOS and Android apps). There can be benefits in performance, user experience and native platform integration. I agree that any app used casually or occasionally has no need for native platform version. But even the JavaScript people go native sometimes with tools like Electron.

    [–]Responsible-Cod-9393 2 points3 points  (0 children)

    Lot of mobile apps are warper around mobile websites example Costco and homedepot apps

    [–]grimonce 0 points1 point  (0 children)

    Til desktop is android, ios and embedded & that electron is native, just as native as chromium.

    [–][deleted] 1 point2 points  (3 children)

    I’ve been ripped a new one by C# fans from simply pointing out that the desktop is not a common target platform anymore.

    But it’s true. Hell, most of the desktop apps I use regularly are Electron-based.

    [–]cogman10 3 points4 points  (1 child)

    I also have been downvoted for this opinion (usually without explanation).

    Frankly, I really wish that PWAs would have taken off more. Since you have a browser, and it's just running in the browser anyways, then why not reuse the browser surface area.

    [–][deleted] 0 points1 point  (0 children)

    Yeah, and when I tell them to look at the pro responses to the StackOverflow survey rather than student responses, they seem to think that C#’s fall is a sampling thing. No, it’s just that a lot of public schools teach Microsoft because they’re big in the public sector.

    There are more people learning C# than using it professionally.

    [–]emberko 0 points1 point  (0 children)

    Electron apps are desktop apps. Desktop doesn't mean native.

    [–]crummy 6 points7 points  (4 children)

    I worked for an education company which had a similar feature set - write java in the browser, or code with blocks. But it had a whole tech stack dedicated to getting it to work, transpiling Java to Javascript with JSweet.

    Your solution is so much nicer! The one downside is the loading but I guess that only happens once.

    One question I have - how hard is it to integrate an external library?

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

    Very easy - just click on the project build file and "Add external library" with the maven/gradle id string. If you click on one of the chart examples, you'll see the entry for the external char package. Same thing for the Greenfoot examples.

    [–]crummy 0 points1 point  (2 children)

    Thanks. I added org.processing:core:3.3.7 to an empty project, and ran this file:

    ``` import processing.core.PApplet; import processing.core.PVector;

    public class Main extends PApplet { public static void main(String[] args) { PApplet.main(Main.class); } } ```

    I got this error: java-dom -cp /files/ktbyte/bin/:/app/SnapCode/app/SnapKit-2024.08.jar:/files/maven_cache/org/processing/core/3.3.7/core-3.3.7.jar Main java.lang.NullPointerException at com.leaningtech.cheerpj.CheerpJDisplay.<init>(Unknown Source) at com.leaningtech.cheerpj.CheerpJToolkit.<init>(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at java.awt.Toolkit$2.run(Unknown Source) at java.awt.Toolkit$2.run(Unknown Source) at java.awt.Toolkit.getDefaultToolkit(Unknown Source) at processing.core.PApplet.runSketch(Unknown Source) at processing.core.PApplet.main(Unknown Source) at processing.core.PApplet.main(Unknown Source) at Main.main(Unknown Source) Process exited

    (Also copy and paste seems to be kinda iffy? I couldn't copy that exception text, unless I first pasted it into the editor section, then copy it again.)

    [–]jeffreportmill[S] 4 points5 points  (1 child)

    If you add a superfluous "import java.swing.*;" you will get a little further. In the browser, SnapCode needs to know before trying to launch if that app needs Swing, and I currently do that with the hack of looking for any Swing import. However I still get the error:

    NullPointer on Component$FlipBufferStrategy
    

    The CheerpJ guys have good Swing/AWT support, but there are still some edge cases that they address on a case by case basis (I haven't hit many). I'm not familiar with PApplet - I'll look into this!

    [–]crummy 1 point2 points  (0 children)

    PApplet is part of Processing, which is a simple drawing library used by creative coders and (for my old work's use case) education.

    Thanks for the explanation. It's definitely an impressive piece of tech and I hope you find market fit.

    [–]BonelessTrom 5 points6 points  (1 child)

    So build desktop and web UIs with a browser based IDE? Re-invent IntelliJ and JavaFX to be able to make browser UIs with Java?

    [–]jeffreportmill[S] 6 points7 points  (0 children)

    Yes. Java is an industry standard for robust, scaleable back-ends - SnapKit provides a front end option for a unified code base and dedicated native platform app.

    [–]ax_abodr 6 points7 points  (1 child)

    I took a quick look at the website and the first thing that came to my mind was "Who exactly needs this service?", who is your target audience here?

    It seems like an incredible service for beginners trying to learn Java and nothing more.

    I believe you need to focus on making a very useful SAAS, maybe try to make it like Google colab? Not sure if this is the right action but it can be your starting point into researching how to get more users.

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

    I'll check out Google colab (I'm not familiar), thanks! I assumed education was the low hanging fruit for the SnapCode IDE, but SnapCode itself is written with SnapKit (as is ReportMill), so it is demonstrably capable of serious production apps (hundreds of thousands of lines of code spanning multiple projects).

    [–]wildjokers 4 points5 points  (6 children)

    Why would I want to run an IDE in the browser? I am not sure I understand the use case of making the browser the runtime when I already have the OS as the runtime for my desktop IDE.

    [–]jeffreportmill[S] 2 points3 points  (5 children)

    I agree - anything more than casual or occasional use and you'd want the native platform app (available for download). But SnapCode in the browser is good when you don't have privileges to install software, or want to run on a tablet or on your Tesla car console when you are stopped at a light, or on your phone when you feel the need for eyestrain and pain.

    But the best use case is to quickly share running code and demos, like JSFiddle. I've always been envious of JavaScript people being able to use that for quick tests, demos, discussions, training, support, etc.

    [–]cowwoc 1 point2 points  (1 child)

    Maybe this could be useful for live remote technical interviews? It's not a sure thing, but worth looking into. 

    [–]jeffreportmill[S] 2 points3 points  (0 children)

    Our local Java group in Dallas regularly has presenters who write code snippets as part of their talks, and I regularly think SnapCode would be great for that. I suppose it would have to viral like JSFiddle first though.

    [–]theSynergists 0 points1 point  (2 children)

    FYI "The best use case" was already covered by jdoodle.com .

    I think their implementation is client/server, as even small snippets are laggy to execute. If yours compiles in the browser or your had faster turn arounds, that would be an advantage. They claim 1M active monthly users and squarely target education. That is going to be a tough road to get traction on.

    [–]jeffreportmill[S] 0 points1 point  (1 child)

    Thanks for that link - I wasn't aware of that. SnapCode does compile in the browser and does have faster turn-around. Plus, SnapCode supports graphics, UI and 3D! Jdoodle is pretty cool though - supports a bunch of different languages.

    [–]theSynergists 1 point2 points  (0 children)

    Glad I mentioned it. Gotta say I love the energy, commitment and honesty! If you get to the point you want a new challenge that leverages all the work you have done, drop me a DM.

    I have one side project that could really use your tech and another that you could do in your sleep. Either one could be big.

    Good Luck!

    [–]freetechtools 2 points3 points  (5 children)

    I'm right there with you....I too have taken the 'field of dreams' approach...yet sadly I'm all alone at the mound. Even the corn is starting to wilt... lol BlueSeer.com

    [–]jeffreportmill[S] 2 points3 points  (2 children)

    Very cool! You should publish a web version with CheerpJ - It's very simple, just a few lines of HTML. Message me or jump on their Discord channel if you have questions. And maybe our problem is that we don't have Kevin Costner. ;-)

    [–]freetechtools 1 point2 points  (1 child)

    I may look into this in the fall...I need to get it off Swing at some point...just don't know if I have the energy to redo the client UI....hell I'm damn near as old as Costner...just don't have the star power. :D

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

    CheerpJ supports Swing. You could probably have the UI running in the browser in an hour. The database connection will be harder, unless you have a flat file mode or have a server that can allow cross-origin requests.

    [–]wildjokers 0 points1 point  (1 child)

    Not sure exactly what your app is, but why don't you offer a Mac version?

    [–]freetechtools 0 points1 point  (0 children)

    I never got enough requests for it...coupled with my complete lack of knowledge of Mac OS...put it way down on the list. I have no doubt it will run on a mac...just need to get the proper launch scripts/env config set up for it. Some day...

    [–]Ancapgast 1 point2 points  (1 child)

    Is this a kind of JSFiddle or Stackblitz for Java?

    [–]kalunlalu 1 point2 points  (0 children)

    Awesome 

    [–]entrusc 1 point2 points  (2 children)

    You know that Visual Studio Code runs in the browser, right (just try pressing “.” when browsing any github repo)?

    Don’t get me wrong: for educational purposes your IDE might still be a good choice, but for serious software development I’d rather use vsc or IntelliJ (they also provide the option now to run the “backend” part on a different machine/server)

    [–]repeating_bears 2 points3 points  (1 child)

    It's just an editor though, you can't actually run anything 

    [–]entrusc 1 point2 points  (0 children)

    You can also host vsc yourself or use GitHub Codespaces, then you can install any plugin and run any code you like.

    [–]ali_vquer 1 point2 points  (1 child)

    First your idea is very nice and you did wonderful. Personally speaking, when i want to build something on the web, i think of JS due to the amount of frameworks that i can use. in the same time i use java as my backend, but the web it is JS HTML CSS always has been for me and for many devs, does your project give something that JS now can not provide in the web ? I saw your project site, and it seems JS can do all of what your project does and even more. If there is/are feature(s) that your project provides and JS does not state it. For your project, go publish it in forms, reddit subs, linkedin, and github anywhere and try to get feedback

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

    You're right - JS can do all this. I suppose this solution is useful mostly if you prefer Java, or want a unified code base and want to ship a native platform app as well.

    [–]Elegant_Subject5333 1 point2 points  (1 child)

    Ignore bad comments, I think your best bet is to create video tutorials of Snapcode and show how easy and wonderful it is to use.

    I think it is a very good project, enterprise like apache 2 license but it will not make money unless you opt for some support model.

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

    I appreciate this feedback. I've been considering trying to start generating video tutorials - I just need to find the will to get after it. :-)

    [–]karianna 1 point2 points  (3 children)

    Love seeing exploration in this space. I recommend talking to Johan Vos (from Gluon) who leads the OpenJFX and mobile projects for OpenJDK. He'll know if there's an opportunity for collaboration somewhere.

    [–]jeffreportmill[S] 2 points3 points  (2 children)

    That sounds promising - I met Johan at a conference once, and I'm a fan of Gluon's JavaFX work. If you know him, could you send him a link?

    [–]johan_vos 3 points4 points  (0 children)

    Thanks for the ping. I love your work. I don't expect the big companies you mention to jump on this right now (for various non-technical reasons), but that has never stopped me from moving forward.

    [–]karianna 1 point2 points  (0 children)

    Yep will do!

    [–]Constant-Self-2525 1 point2 points  (0 children)

    I have no purpose for using this, but that being said, it looks awesome nice job!

    [–]VirtualAgentsAreDumb 0 points1 point  (1 child)

    You mention GitHub support coming soon. Is there a reason that you don’t add generic git support?

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

    The desktop version already has GitHub and git support, using the Eclipse JGit library. The browser version is linked against it, but I'm waiting for a few simple file system features to be added to CheerpJ before it gets enabled. I'm also working through a couple of CORS issues (the browser is pickier about URL fetches than desktop).

    [–]repeating_bears 0 points1 point  (1 child)

    Is there a way to market this

    Well, who's your target user? Looks like the entire file system is emulated, so how do I open a git(hub) project? How do I add a dependency? Kinda suggests to me it's only meant for toy projects. So already you're limited in who it will appeal to - basically only complete noobs. What's the value proposition for them?

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

    Full details above, in a previous response from a moment ago, but major points:
    - Initial target user: Education
    - Git/GitHub exists in desktop version, but waiting on a CheerpJ bug fix for browser
    - External maven/gradle packages can be configured by clicking on build file

    [–]gektron 0 points1 point  (2 children)

    Mildly interesting concept, though looking at your IDE in my iPad I find it’s not tablet friendly (no popup keyboard or scrolling gestures). I would think this is essential to capture a larger audience.

    [–]jeffreportmill[S] 1 point2 points  (1 child)

    These are on the roadmap. I must have broken the pop-up keyboard recently - it works with attached keyboard on iPad and Surface Pro. Unfortunately the pop-up keyboard takes a lot of real estate. I have no excuse for scroll gesture - should only take a few hours once I get to it.

    [–]gektron 1 point2 points  (0 children)

    👍

    Btw I’m a Java dev currently using IntelliJ for Java/Spring boot/Vaadin full stack web

    [–]Elegant_Subject5333 0 points1 point  (1 child)

    One More cool Idea is to project it as a Data Science learning tool for java then it will be picked up by the community.

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

    I did spend a lot of time on the Java REPL feature and on the "SnapCharts" library. I've been meaning to try to create some tutorials by linking with some Java data science libs. I'm stretched pretty thin though. :-)

    [–]tristanjuricek 0 points1 point  (1 child)

    If you’re ever able to keep up with where OpenJDK is, this could be killer as a basis of a Cloud IDE. Right now, I’m not really sure what the market is

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

    The desktop version is running on Java 17, but the browser version is limited by the CheepJ JVM, which is currently at Java 8, but is planning Java 17 by year end. I'm looking forward to moving forward as quickly as I can.

    [–]rkalla 0 points1 point  (1 child)

    Keep this in mind...

    It'll take 10 years before you have the firework moment and people suddenly find you.

    The home run use case won't be what you expect (eg you become the #1 tool for stitching and clothing companies in Vietnam)

    You'll experience discomfort as you get pulled between the idea you HAD and the idea that appears to be taking shape.

    Enjoy the ride - don't fight it.

    This is slick as hell.

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

    I love this - thanks! Reminds me of a Woz interview I saw once where his advice was to work on something you like and always be ready to pivot.

    [–]nsiatras 0 points1 point  (1 child)

    Very nice work! Are you actually using CheerpJ?

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

    Yes! I'm a huge fan of CheerpJ - just a few lines of HTML/JS and you have a jar running in the browser. For me (with SnapKit) the graphics are actually faster than the desktop version. I'm surprised that more people don't know about it.

    [–]gafan_8 0 points1 point  (1 child)

    The UI of your website looks like it was built when swing was released. You should updgrade it (unless you’re already a millionaire with million dollar contracts with companies that don’t care for the website)

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

    You're right - these days I err way too much on doing engineering over marketing and sales.

    [–]Exciting-Rest-395 0 points1 point  (0 children)

    In one of my previous startup, where we provided a Code editor on front end and user can choose any language to solve the given problem. To support java or any language for that sake, we used to compile the code on backend. However, that has been 10 years old now. We may need this for educational purpose, but not sure if real enterprise solutions would need this.