Hacker News new | ask | show | jobs
by hollerith 2595 days ago
>it is now the recommended practice for developers to create their own embedded runtimes with the JDK tooling

I am unfamiliar with Java and am curious: if I open 2 Java-based apps on my Mac or Windows box, how much of the memory devoted to Java tooling that would have been shared if the apps were built with the assumption that there is a JRE already installed locally is instead duplicated because of the recommended practice that you describe?

1 comments

Very, very little. Applications don't include the whole JDK, but a custom runtime they create with a tool called jlink (I meant that JDK tools, i.e. jlink, are used to create the custom runtime, not that the runtime includes the JDK tools). That runtime is only a few tens of megabytes (smaller than the shared JRE, as only modules actually used by the application are included). Also, the decision to do away with the shared JRE was sort of forced by shifting consumer and OS behaviors, that no longer encourage shared runtimes, but are shifting to containers and app stores. So whether a shared runtime is technically a better approach or not is moot, because the entire software ecosystem is shifting away from them.