Linc Davis wrote:
Since you are being plied with false information, as usual on this site, I'll expand on a couple of points.
Hello again Linc,
Years ago, you acknowledged that you weren't a programmer. You can't become one by reading a couple of vendor docs. John Lockwood is right. Java on OS X, or even just Java on any Desktop OS, is a mess. But if you wanted to learn about programming, Java is an excellent place to start. Just avoid all of the confusion over web browsers.
A standalone, legacy Java application or bare JAR file will not run under the Oracle runtime; it will run under the legacy Apple-distributed runtime, as documented in the link I posted in my first comment.
Sorry, but this is completely wrong. Only those pre-packaged, Mac-style Java apps require the legacy runtime, and only then if you want to double-click the .app file. Any other Java app or bare JAR file will run just fine on Oracle. You can easily test this yourself. Run a virtual machine and install the Oracle JRE. Then download ATLauncher (https://www.atlauncher.com/downloads). It obviously won't do much if you aren't into MineCraft, but you can see it run. Select the ATLauncher.app, show Package Contents, drill down into the Resources folder. Double click the JAR file. Presto! Then try to double-click the ATLauncher.app. That's funny. It won't launch. Didn't you just install a JRE? OK. Go ahead and install the Apple legacy JRE. Now you can double-click on ATLauncher.app to run it. You can also still double-click on the JAR file to launch that. But which JRE will that use? That I don't know. At this point, your Java environment is all messed up. The only way to manage it now is from the command line. From the command line, you could set your JAVA_HOME to either the Apple JRE or the Oracle JRE and run either version of Java. The Oracle JRE will have a funky path, but it doesn't really matter.
Newer self-contained Java applications for OS X are built using the Oracle Java Development Kit (JDK), which is a product distinct from the JRE, and contain an embedded version of the JRE, as documented here:
https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-pac kaging.html#BCGIBBCI
Technically this is correct, but this is a fundamental misunderstanding of the Java architecture.
First of all, Java applications have always had the potential to include a bundled JRE. Early on, this was the only way it would because early versions of Java were very flaky and, in those days, a Java app could only be guaranteed to run under the JDK it was development with. Now, you can still do that, and Oracle would like to resurrect the practice for Mac apps, but that ain't never gonna happen and Oracle knows that. That's why the installer includes adware. This is a long story so I won't bother to go into it.
(PS: Kudos to Oracle for recommending the wonderful Inno Setup to build stand-alone EXE files for Windows. I always wished the Mac would have a decent installer architecture like Windows. After using Inno Setup, a great open-source "utility" written by an individual developer, it was a huge downer to go back to Apple's Package Maker.)
The key point I want to explain is the difference between the JDK and the JRE. The JRE is the runtime, the virtual machine. The JDK is just the development kit, like Xcode. For Objective-C apps on the Mac, the runtime comes bundled with the operating system. So you can download Xcode, build an app, and it will run on some other Mac because you know the runtime is always going to be there - it is part of the OS. But if you use the JDK and build a Java app, then your users will have to download a JRE from somewhere. You can bundle a JRE, but then your little Java app is over 67 MB in size. That was a big deal in 1997. Both the JDK and Xcode include runtimes, but those are primarily for linking the results of your development work. Even on your development machine, you may, and probably should, run the app under a different JRE.
You can see how all this works with Swift 2. Swift 2 is in much the same state that Java was in circa 1997. Macs aren't guaranteed to have a Swift 2 runtime installed. So, when you build a Swift app, Xcode will automatically bundle a Swift 2 runtime in your app, just like the JDK can (optionally) do. Otherwise, the user experience would be just like Windows where if you wanted to install a modern Mac app, you would have to download and install runtimes from Apple. Apple went that route with Java, but not with Swift. This means that each Swift 2 app you have installed has its own Swift runtime, but that's life and that's why you need a lot of free disk space these days. That requirement will be removed soon I'm sure.
If you want to learn more about programming, but you are going to have to get your hands dirty. Documentation alone can be misleading and quite unreliable.