5 ms·
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 de
by bni 14y ago
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.
- densh 14y agoIMO 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.
- bni 14y agoYes, but still parts of the JVM would be duplicated between apps and updated on app developer X's own schedule.
- regularfry 14y agoPart of what this seems to be there to solve is the situation where the user doesn't have access rights to install a JRE.
- mgkimsal 14y agoWhy "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.
- finnw 14y agoClickOnce[1] does this. Some other apps have their own mechanisms to do the same, e.g. Google Chrome. I don't think it's a good idea though, as it makes those apps more susceptible to being modified by malware. [1]: http://en.wikipedia.org/wiki/ClickOnce http://en.wikipedia.org/wiki/ClickOnce
- stcredzero 14y agoIs this really such a problem on modern systems? How many stripped JREs is it going to take to add up to a gigabyte?
- georgemcbay 14y agoThere 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.
- deleted 14y ago[deleted]
- arturnt 14y agoSpoken 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.
- bni 14y agoI 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.
- wiradikusuma 14y agowhich part of intellij installation that is more developer friendly? i just download the DMG and drag the icon to Applications, just like other apps.
- bni 14y agoIm using ItelliJ on linux now, IntelliJ is just a .zip. You are right thats the way it works on OS X and that is excellent.
- efsavage 14y ago"Dont get me started on Eclipse install process." Actually, please start. I install the JDK via an installer, unzip Eclipse, run eclipse.exe, and it just works. Am I missing something?
- thebluesky 14y agoProbably 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.
- shaggyfrog 14y agoAt least on Mac OS X, you can double-click .jar files and they will get launched as the user expects, complete with Dock presence.
- bni 14y agoYes, that is a bit better than Windows, were this functionality would have mattered the most to have from the beginning. Still, its not 100% the way OS X users expect apps to work.
- darklajid 14y agoYou 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 "C:\Program Files (x86)\Java\jre6\bin\javaw.exe" -jar "%1" %* whenever I want to 'launch' a jar file. 1: http://stackoverflow.com/questions/1667830/running-a-jar-file-without-directly-calling-java http://stackoverflow.com/questions/1667830/running-a-jar-fil...
- jsight 14y agoThe 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.
- freehunter 14y agoFile 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.
- 14y ago
- stevoski 14y ago> 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.
- jiggy2011 14y agoYes, it's always amazed me how such a simple thing gets screwed up. Here on Ubuntu I had to write a custom minecraft launcher just so that I could launch the .jar from my desktop.
- bad_user 14y agoYou can use the binfmt_misc kernel module to configure Linux to automatically launch Jar files that are marked as being executable. See: http://www.mjmwired.net/kernel/Documentation/java.txt http://www.mjmwired.net/kernel/Documentation/java.txt That Ubuntu doesn't do it by default, that's just their choice (a sane choice I think).
- TazeTSchnitzel 14y agoHold it! Kernel module seems a bit drastic. You can just change the file association.
- nkurz 14y agoI'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?
- Ralith 14y agoI 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.
- TazeTSchnitzel 14y agoYeah, and I rarely use java command line utilities, personally, with one exception.