7 ms·
Java simply has a much higher barrier of entry. Not only in regards to figuring out the language and resources available but also the fact that creating a GUI s
by creesch 3y ago
Java simply has a much higher barrier of entry. Not only in regards to figuring out the language and resources available but also the fact that creating a GUI still requires external dependencies.
Electron isn't just cross platform, it is cross platform based on technologies (html, css and javascript) that also by a huge margin have the largest amount of developers available.
- whartung 3y ago> Not only in regards to figuring out the language and resources available but also the fact that creating a GUI still requires external dependencies. What external dependencies does Java need that's not in the JDK itself? I have an app with Mac and Windows installers (and thus bundles JDKs), it also runs on Linux (via a fat jar), I tested it on Ubuntu, but for the life of me I couldn't figure out how to package it properly. It was more complicated that I cared to invest it at the time. As for the barrier to entry, I feel the same way about the web. I find the JS and Web ecosystem to be utterly overwhelming, one reason I stuck with Java over something like Electron, and the installers/footprint of the app are smaller to boot.
- creesch 3y ago> What external dependencies does Java need that's not in the JDK itself? I mean that it doesn't come with Java itself, but you as a developer need to pick a UI framework and not all of them actually work all that well cross platform or will get you an actual modern interface. Edit: I should also note that the threshold for entry I am talking about is for people just generally starting out. There simply are way more resources available for web related development than there are for java. Also, when you start bundling your JDKs I am not sure you can talk about a smaller footprint anymore.
- ElectricalUnion 3y ago> Also, when you start bundling your JDKs I am not sure you can talk about a smaller footprint anymore. What, do you bundle Electron source and Electron build environment with your Electron app? Why would you do the same and bundle Java source code + Java compilers in your Java app? Why would you do the same and bundle <any language> source code + <any language> compilers in your <any language> app? If you need to create a "just works without dependency b.s." experience in Java, you use the correct tooling for that, jlink.
- creesch 3y ago> If you need to create a "just works without dependency b.s." experience in Java, you use the correct tooling for that, jlink. At which point you are including a similar footprint as Electron does by shipping chrome. I mean, you must have realized I was talking about the inclusion of the JRE and whatever else is needed to make a java application run on a system as a standalone application. So I am honestly not sure what you are arguing besides semantics.
- whartung 3y agoWell, Swing is still bundled with Java. Netbeans uses the "Flat Look and Feel" and looks ok to me. I find Swing a lot more work compared to FX. JavaFX used to be bundled with Java, but was removed. Some JDK distributions bundle FX like it was before, and adding FX to a new project is simple and straight forward. Maven packages it nicely, and it includes the platform specific binary parts. If you can use Log4j, you can use Java FX. Onboarding onto FX is not a high bar. I can not speak to SWT. There's several examples of "modern" UIs in FX, I can't speak to any of them, I don't pay much attention to that space. It's imperfect compared to the web, but not impossible.
- chefandy 3y agoJava FX seems better than swing, but it's an external dependency now though, isn't it? I thought it got removed from the jdk a few years ago.
- whartung 3y agoIt was. Even before it was more "bundled" with the JDK than "part of Java". But, to be honest, that's a real nit. It's a standalone dependency, it's 4 lines in a POM file, it doesn't drag the internet with it, and it only relies on the JDK. So, while it's a large subsystem, it's a "low impact" dependency in terms of side affects and complexity.
- ausbin 3y ago> it's a "low impact" dependency in terms of side affects and complexity. I wish that were true in my experience. But we have struggled to support {macOS, Windows, Linux} x {x86_64, arm64} with JavaFX and one .jar for our application. This is a 250-line diff, not a 4-line diff: https://github.com/ra4king/CircuitSim/pull/93/files https://github.com/ra4king/CircuitSim/pull/93/files. We have to manually manage .dlls and .sos by hand. If you know a solution that is 4 lines, we would be very grateful. All we want is one .jar with JavaFX in it that supports many OSs and architectures.
- 3y ago
- anthony88 3y agoFor Linux, I'm using jpackage to package my Java software to .deb (x64 architecture) file. For all the other Linux variants, I've a .tgz file that contains the jar file, libraries and icons of the applications. The problem I have with Linux is named at the end of the website: "Sharing your creation". It's pages and pages of documentation that is not relevant to the packaging of your application where you can spend hours of work without finding what you want of finding out that it doesn't work for you because for example it's not on GitHub. Hopefully jpackage was able to fix it for the .deb format. Instead of working on more documentation, working on better and easier to use packaging tool would help.
- tripleo1 3y agohttps://github.com/hydraulic-software/eton-desktop https://github.com/hydraulic-software/eton-desktop
- account42 3y agoThe JRE itself is an external dependency that you need to bunle because it is not part of most Linux distributions. And even if there is a JRE installed it is not guaranteed to be able to run your Java application.