r/programming • • Oct 21 '17

Using Java 9 Modularization to Ship Zero-Dependency Native Apps

https://steveperkins.com/using-java-9-modularization-to-ship-zero-dependency-native-apps#.Wes5IMWbUWE.reddit
310 Upvotes

109 comments sorted by

View all comments

213

u/[deleted] Oct 21 '17

Can we have a talk about what "native" means?

Maybe I am old fashioned but I don't consider a jar and a jvm together comprising a native application.

5

u/Sean1708 Oct 21 '17

Out of interest, do you consider emacs to be a native program?

3

u/[deleted] Oct 21 '17

Good question.

On Linux, I use it with -nw mode so it's a terminal application, because nano sucks and I keep forgetting how to use vim, and I sometimes need to use it on a headless remote.

So that's obviously a native UI, and a native deployment installation process (apt get) for Linux.

As for native code, I dunno what it's written in (I guess C or LISP), but the few times I open the full GUI version by accident because I mistyped or forgot -nw, it takes longer to start than VSCode (which is Electron).

So 2/3 yea, 1/3 i dont know.

3

u/Sean1708 Oct 21 '17 edited Oct 21 '17

(For the purposes of this comment I'm going to refer to these JVM + Jar things as Java "Native" Applications, or JNAs, just so that I don't keep having to say JVM + Jar things.)

So that's obviously a native UI, and a native deployment installation process (apt get) for Linux.

What constitutes a native UI here? If I wrote a terminal text editor as a JNA, would that be a native UI? If I then made it installable via apt-get, would you then consider it a native application?

I suppose what I'm asking for here is a concrete definition of what a native application is to you.

As for native code, I dunno what it's written in (I guess C or LISP)

Largely why I asked the question is because the bulk of emacs is written in LISP which is then compiled down to bytecode and shipped alongside a LISP VM written in C (both the LISP code and VM come in a single executable as far as I am aware). So to me emacs is very analogous to one of these JNAs and in my experience most people would call emacs a native application.


In case you were wondering what my personal opinion is on all of this (I know, no-one asked me): I don't think seperating things out as native and non-native applications is a particularly useful thing to do, and I think we should be more concerned with how a program works (efficiency, usability, how easy it is to install, etc.) rather than how it is classified. I also think that most people's definition of a native application is not well thought out, although I do concede that I may just not have come across a decent definition.