The Java way has always been: To run this, click on the .bat file or type java -jar myapp.jar. And some people wonder why Java has been such a failure on the desktop.
This should have been in Java from the beginning, instead of outsourcing this functionality to third parties (Mainly Windows only installer applications that sucks, and also isnt used that much).
That said, I think it is misguided to include a JRE in the bundle. The correct way would be something like OS X Lion has, promt the user if Java is not installed. and then do a more or less automatic install of Java, in the system.
> That said, I think it is misguided to include a JRE in the bundle. The correct way would be something like OS X Lion has, promt the user if Java is not installed. and then do a more or less automatic install of Java, in the system.
Apple is recommending that as of Mountain Lion, Java apps should bundle the JRE from Oracle's OpenJDK and use that. Apple's unofficial Java spokesperson Mike Swingler is adamant that this new approach (for Apple) is better.
IMO the correct way is to include subset of JRE that's actually required for given application. This can lead to relatively small total application size and deployments that do not require any knowledge of java and java world from end user. Having one JRE for all apps on the system is nice but it's usually not needed.
There are downsides to this sort of duplication (like security bug fixes not being automatically applied to all apps using a certain JRE revision) but in real-world practice, the benefits outweigh the downsides.
Windows' SxS DLL system has the same basic issues but it solves so many distribution, UX and versioning problems that the downsides are totally worth it.
Why "installing" almost anything requires "access rights" is still confusing to me. I don't understand why there's not been a movement to 'install' things in to my own home directory structured, vs "c:\program files" on windows "/usr/bin" and such on linux. - Fall back to c:\mystuff or ~/bin.
I'm tempted to downvote this, but maybe you know something I don't. The kernel module allows you to chmod +x a class, jar, or applet and execute it from the command line. Or run it from a script, or exec() it, or whatever. It essentially makes it a real executable alongside ELF. Is there some other way to accomplish this? What file association do you mean?
I believe he's talking about configuring your desktop environment such that it will launch .jar files with java (perhaps through a script intermediary), which is indeed not nearly as cool as what you're describing.
Given that the original comment here said "from my desktop", I assume he means something he can click, and associating jars with the JRE in the desktop environment is probably a reasonable solution.
The developer of a jar can specify a Class-Path entry in the Manifest file to set up the classpath correctly. In this case, "java -jar some.jar" is all you need.
You seem to be under the impression that Windows doesn't do the same. That's wrong.
Windows does the same thing as OS X. You can do the same on Linux, even on the console over there (using binfmt_misc, see [1]) without a desktop environment.
For as long as I can remember Java installed an entry in HKEY_CLASSES_ROOT for .jar files. On my machine it's currently set up to run
The biggest problem that I've seen is that on Windows apps sometimes steal this association. I used to tell users to do this to launch Java applications, but it was surprising how many times they would end up in WinZip or some other Zip handling application.
Java does try to get that to work by default, though.
File compression utilities really do go way overboard on what they want to open as zipped files. Installing one usually means having to uncheck maybe half the defaults because they're more commonly used as regular file formats.
Spoken like someone who knows nothing about Java. There are a bunch of apps written in Java web start(ie yEd), which involves just clicking on a link. Off the top of my head, some very popular Java apps are Eclipse/Intellij or Azureus.
I use IntelliJ daily, and the install experience is "devloper friendly", not exactly end user friendly. Dont get me started on Eclipse install process.
JWS is awful. It is totally not the way users expect to install applications.
Probably the part where it usually can't find your JDK (and barfs with some random error on startup as a result) until you edit a config file or set some environment variable(s). NetBeans on the other hand usually finds 5 different JDKs on your system and asks which one you would like to use.
This should have been in Java from the beginning, instead of outsourcing this functionality to third parties (Mainly Windows only installer applications that sucks, and also isnt used that much).
That said, I think it is misguided to include a JRE in the bundle. The correct way would be something like OS X Lion has, promt the user if Java is not installed. and then do a more or less automatic install of Java, in the system.