Skip to content
gyk4j edited this page Oct 5, 2023 · 1 revision

Why use Java and not Python/JavaScript/TypeScript/C#/C++/Go/Rust?

I am a Java developer and I know the open source libraries (Apache Tika, ExifTool, MediaInfo, 7-Zip) and language bindings that can do the job.

Other languages may have trouble using Apache Tika (Java) and still need a JRE to run it as a separate process or REST server. Example: C# and Go.

Other languages may also lack ready bindings to ExifTool and/or MediaInfo, so I just made do with Java to solve an immediate need.

The overall aim is to maximize the chance of extracting useful metadata using proven and reliable production grade libraries. Python and JavaScript/Node have their own smaller modules for extracting metadata for certain file types, but none are as comprehensive as Apache Tika. They may also require additional tools like pdf-text and image-size etc. which make deployment harder.

Why isn't there a Docker version?

Docker is suitable for micro-services, servers and software communicating over a network TCP/HTTP protocol. This is a desktop tool with GUI, although I can rewrite it as a RESTful service and create a Docker image out of it. And user has to open a Web browser to see a GUI at http://localhost:xxxx/wreck.

But why make it a RESTful service when it is a tool for a single user bulk processing files on a local disk?

Why use Java Swing and not JavaFX/OpenJFX in 2023?

Oracle delayed and changed its decision on inclusion (and exclusion) of JavaFX in JRE. For Java 8 to 10, only the Oracle JRE includes it, but not OpenJDK. It is however removed in Java 11 onward, and the JavaFX library files have to be added in manually. JavaFX first appeared in 2008, with version 2.0 following in 2011. But development was slow and did not become officially part of JDK until 2014. Just 4 years later in 2018, Oracle announced its removal in JDK 11. It was literally killed when it has not gained widespread traction.

Without knowing whether a user is using Oracle or OpenJDK JRE and which Java version he/she has, it is impossible to decide if I should bundle a distribution package with JavaFX libraries.

Bundling newer/older JavaFX library files when the JRE already has it may lead to class conflict, and Java module did not arrive until Java 9, but there are still many using Java 8 today as a LTS release.

When I release software to the public, I want to be reasonably sure that it would run with the required dependencies included, so I opted for simplicity.

In any case, JavaFX/OpenJFX default theme does not look great either on any platform, but JavaFX/OpenJFX does make the codes cleaner, and the built-in charting is useful.