Friends don't let friends install Java.
Java is the new Flash.
Oracle has delayed the release of Java 9 by six months. We've been watching the date since we reported on Java 9's new naming scheme a couple of weeks back and named September 22nd, 2016, as the debut date for the new code. Which wasn't entirely right, as reader Sean Coffey pointed out because in this thread Java's overseers …
Java is burdened by the bad reputation of using it for web applets. That has indeed turned out to be a bad idea, and also made totally redundant by Javascript. But there is nothing wrong with using Java as a normal programming language, like for server applications or even on desktop. In that role it is way safer than C or C++.
Where I work we recently rewrote all our web software. We ditched systems that relied on Java and Flash in favour of HTML5/AngularJS gear that does the job much more seamlessly. Wanna guess what the backend servers still run and will continue to run? Yup, Java. Lots and lots of Java.
"Lots and lots of Java."
Yes and that's usually the problem. Java programmers tend to solve problems in over complex ways. When you would usually write a small program to do the job, they write thousands of lines of code, trying to build some grand architecture... which is then lacking crucial features while providing features nobody wants.
Plus there's the problem of incompetent Java programmers. Some programmers seem to assume that Java somehow magically fixes all their problems. A nice example is a project I worked on. Some protocol requires the client to send a 32 bit unsigned integer as a text to a server, that server then responds with that integer. Both times the integer gets sent as a text field in a JSON message. On the first tries we have found out, that it only works approximately 50% of the time. Debugging it, we found that the server responds to numbers above 2147483647 with negative numbers. A classical integer overrun. Java could of course protect you from this, but it doesn't. Integer overflows are even baked into the standard. Modern Pascal, for example, does it differently. It allows you to turn overflow checking on or off. If you turn it on, you get an exception in case of such an error. Overflow checking is much easier to do on the compiler level (it can use the carry flags of the CPU) and takes virtually no time to do. A branch not taken only takes the time to load the opcode from memory... which is usually done in parallel to the other functions. "modern" CPUs will then just "run over" the branch and back track in the rare case that you had an overflow.
Java for desktop apps is burdened by:
1) you can't just install a "Java runtime for desktop apps", the only installer also installs the Java browser plugin, which is useless (no legitimate websites I care about use it) and a security nightmare.
2) an installer that tries to install malware and hijack your home page & search settings whenever it installs a security update, which is regularly.
Try talking less tech-savvy relatives through that one. Point 1 means they NEED to update as soon as a security patch comes out. Point 2 means they'll probably break their computer if they try, and call you asking what happened to Google.
Java should never be used for desktop apps. Or if it has to be, then the developers should go the Minecraft route and bundle their own cut-down Java runtime that is only used for that one app.
I keep getting addies for the retarded idea of pulling "JavaScript to the server side", which makes about as much sense as cutting off a leg to move more elegantly.
This morning from O'Reilly
How well do you know JavaScript? According to Kyle Simpson, not well enough. It's easy to learn parts of JavaScript, or focus on the good parts, he says, but much harder to learn it completely. Fortunately, he's here to help.
NO! *CK YOU KYLE SIMPSON, WHOEVER YOU ARE.
At least Java is a language that has some reasonable (though old-school/clunky) design and a skillbase behind it. Maybe it's time to move to F#
1) you can't just install a "Java runtime for desktop apps", the only installer also installs the Java browser plugin, which is useless (no legitimate websites I care about use it) and a security nightmare.
These days, most browsers disable this for you. In current Firefox you actually have to jump through hoops if you want to enable a Java applet.
2) an installer that tries to install malware and hijack your home page & search settings whenever it installs a security update, which is regularly.
On Linux, you can go with Openjdk (the Open Source version of Java, actually mostly the same code as Oracle's) which is provided by all major Linux distributions, and gets updated by the distribution's normal update mechanism, no malware added.
Sad if if there is no Windows equivalent. But I have had no trouble for years with the regular Java updater, after learning to un-check the intrusive proposals.
"In that role it is way safer than C or C++."
Nothing wrong with C++ if you treat with respect and learn to use it safely. Modern C++ is far easier and has many more safeguards baked in than it used to. Any language can blow your foot off if you let it, it's just that C++ comes with a ready loaded and cocked gun, the trick is to disarm it before you use it!
"But there is nothing wrong with using Java as a normal programming language, like for server applications or even on desktop. In that role it is way safer than C or C++."
I do a lot of work with Java, and quite frankly it's just another case of "You can Write FORTRAN in any language". Resource leaks, excessive memory consumption, tragically heavyweight runtime, random .so deps through JNI/JNA, JVM pauses triggering timeouts etc...
For the record I am a Sun (RIP) fanboy and I pretty much detest MS and most of their products, but even I have to concede that C# and the CLR cause far less strife than Java & JVMs. Snoracle could have done the world a massive favour by shamelessly stealing features from C# and the CLR.
Multiple incompatible flavours of the JRE/JDK haven't helped either.
As usual YMMV.
"But there is nothing wrong with using Java as a normal programming language, like for server applications or even on desktop."
You mean other than the need for a JVM for it to run inside.
Personally I'm sick and tired of meeting Java applications on the desktop since the first thing I have to do is recognize which Microsoft standard UI behaviors and practices have been getting the programmer's goat for years so I can alter my expectations and habits to allow for (from memory of real examples) Hot Keys that don't do what they do even on Unix terminals, window sizing button positions, scroll bar behavior and so forth - pointless and annoying crap that doesn't help get the UI into the background of my perception where it belongs so I can do my job.
And don't get me started on my feelings about the "just so good and no further" attitude that means screens don't refresh properly when displaying dynamic information (on Unix or Windows), or the Java Programmer habit of believing a three yard long execution stack trace is a suitable substitute for a five inch error message.
But of course, that is a cultural thing, not a language shortcoming.
We've just had V. 8 and now 9 is already on the horizon?
Why?
O of course its just the way it is with software these days, regardless of platform or function. All the big firms go, 'I know lets just keep rolling out new versions with new features nobody wants or asked for, increase the codebase, introduce more bugs and slow everything down!'.
Yep you couldn't make it up.
I miss the days of long upgrade cycles, I started way back with BASIC. Then moved onto dbase/clipper/ Clipper 87->Clipper 5 that'll be 3 years. Foxpro 2.0->2.6 that'll be three years.
Its one of the joys I find in using SQL, I'm happy to work to an ANSI 92 standard, I don't need change every frickin' 6 months!
"We've just had V. 8 and now 9 is already on the horizon? Why?"
Simple, Oracle declared that Java should not be "the new COBOL". That means they have to do everything to not make it become stable (as in unchanging). That's why they follow the idea that new features are always good, even if they are not very useful or well thought out. New means good to them, period.
Lots of things suffer from it and indeed for it. Anyone remember when Slackware Linux jumped from release 3.5 up to 10 (IIRC)? For a long time it refused to join in with what other distros (RedHat) were doing, and then decided that it would join the party after all.
"Tell us about it. I'm an openSUSE user whose "upgrade" path skips from version 13.2 to 42.1!"
I think blag linux won the version number game some years ago.
Clueless civilian here: how would I package up a harmless little application (planisphere app) written in Java so it had its own limited run-time? Is there a button I click in Eclipse?
Coders who specify a very specific version of java (in my experience HVAC controllers are coded this way for some reason, as well as "security" devices) and force you to keep a creaky old hole-ridden application on client pc's.
We have numerous devices (and some vertical applications) that require nothing newer than 1.5!
Said settlement is in an action where ORACLE admits it knew about various security flaws in 2010 -- AT THE TIME IT BOUGHT SUN.
So ORACLE now has to tell users about the impact of these flaws on all versions for at least the last five years.
I wonder just how "secure" version 9 will turn out to be.