Is "Java" absolute garbage, or what?

For the last 10 years, I’ve had nothing but problems with Java.

I’m an attentive and informed computer user: I update my OS, I defrag, I do virus and spyware scans, I update all my apps (including Java), etc…

But whenever Java is involved, I always have problems: Apps don’t load, browsers crash: "Oh. Java is involved. Big surprise :rolleyes: "

And this problem has persisted through multiple OS’s and multiple computers entirely.

What gives?

What’s your question? You’ve expressed an opinion.

I’d regard “What gives?” as a question, no?

Well, millions of people use Java on their computers every day, without problems.

So “what gives?” is probably some error on your part, or an erroneous setup of Java on your machine.

If you provide some specific details, people may be able to offer some possible solutions to whatever problems you are having.

Ok, I can live with that. If there is something I can do on my end to ensure that Java runs smoothly, I’d be happy.

I don’t know a lot about Java. What should I be doing to ensure it is running smoothly?

We can’t answer, because we have no specifics about the unsmoothness that you’re experiencing. How do you know that Java is the problem? Could you give an example of the error message you’re getting?

Are you using Sun Java, or Microsoft’s craptastical MS-Java Virtual Machine, which is the biggest abomination since Wonder Bread? If so, you deserve what…no, sorry, nobody deserves that.

Java is a good concept that was somewhat bitched up in the execution, and there’s a lot of poorly structured Java code out there (what would you expect from any language whose core philosophy can be abreviated as “OOPS”) but I don’t have a big problem with most Java apps. What browser are you using that is having so many problems?

Stranger

I suspect you’re referring to Java applets and not standalone applications? If so, there is that PDF-like annoying wait for an external application/plugin to load, and corresponding opportunities for errors to occur.

(Creds warning: Ex-CS prof and Sun Certified Java 2 Programmer.)

Java was created by essentially a single person with a “narrow point of view” to say the least. (And an archaic one at that.) Sun bet a big chunk of the company’s future on it but was too chicken to enforce proper rules of software development on the Java group. Basically a “Church of Java, the One True Language” was born. This is never good.

So a lot of things have were (and continue to be) done badly. The language was released way too early. (Hence the heavy use of “deprecated” everytime you read the documentation.) There’s a lot of anti-Object Oriented Programming stuff built into the language (which is bizarre to say the least). The error-handling system is completely messed up. And on and on.

Hence Sun’s Java software is in constant state of flux, always trying to fix the patches to the bodges to the mistakes that should have never have been there in the first place.

(Note that Sun’s other stuff is great. Solaris is a great OS. It’s the Java group that is out of control.)

Programming Java is a nightmare. Many simple things that every other modern language has cannot be done at all in Java. You twist, turn and scream trying to get it to do things in an approximately reasonable way.

A lot of Java programs are a mess.

Put it all together and you have the answer to the OP’s “question.”

Java code is interpreted each time it is run, correct? That is what makes it slow. I believe that was done for the benefit of multi-platform compatability.

Other programs (like AIM, Firefox, etc) are compiled into machine-language .exe files that are tailored to be efficient on your particular computer processor (x86, PowerPC, etc.) But they won’t run on other families of processors like intrepreted Java code will.

There are of course ways to make Java more efficient, but I don’t know first-hand how effiecient or wide-spread they are.

Java hasn’t been interpeted since the 90s. Java bytecode is now compiled at load-time to native instructions, which are executed.

The reasons that Java has a reputation for slowness are:

  1. Loading the JVM(and all the system classes that go with it) can take a while
  2. Java GUIs aren’t always that responsive
  3. People tried Java in the 90s, found that it was slow and that impression has remained to this day

All computer software is jury-rigged, but Java is even more messed up than most. I dealt with an application that used Java. Every time Java released a new version (even with the slightest difference in version number: 1.4.1 vs. 1.4.2, for example), it could not be installed without the danger of messing with the program. I had an automatic download icon on my server, but was told not to click on it, since any change could break the program.

And you needed the precise version of Java to get things to work. Slightest change, and it crashed. It was as if the latest Firefox upgrade would keep some web pages from ever displaying. Really sloppy.

The biggest problem with Java-the-language is that it was designed by someone talking down to the mythical “Average Programmer”. This means it’s a deliberately underpowered mess full of stupid rules that exist solely to keep people from shooting themselves in the foot. This leads to the unclear, unclean, and unfixable coding style ftg mentioned.

Here is a telling quote:

Guy Steele damned well knew better than to create Java. He had helped design a few (at least two, anyway: Scheme and Common Lisp) really good languages prior to the Java effort. He really had no excuse but arrogance.

The sad thing about Java is that, in many important ways, it is still better than C and C++. And that’s all managers see, which is why it’s still used.

Well, no. Some mathematical and engineering software can be rigorously proven in the mathematical sense.

As Oz replied after he was informed that vampires & demons are real & Sunnydale was full of them: “Actually, that explains a lot.”

As soon as I read that line, I knew what language you’d mention further in your post:

:stuck_out_tongue:

I don’t think that’s the whole story at all. Java is inherently slow. Using even well designed software (IntelliJ IDEA, for example) is like running in treacle.

This isn’t true. It’s true that a lot of older commercial software contains a core of poorly documented legacy code written in obsolescent languages and has been “enhanced” ad-hoc, but by and large modern programmers are better (if not necessarily good) about following good coding technique and documenting their code, plus the use of external libraries has vastly simplified the process of writing code; now you don’t have ten different programmers coming up with seventeen different ways of doing a sort or numerically solving a differential equation; they all call the same library to do the heavy lifting. By and large, code today is much better written that the Fortran crap from the Seventies and Eighties I occasionally have to dig through which was apparently written by 10,000 chimpanzees in front of 10,000 IBM 3270 terminals.

Stranger

Well, it’s inherently slow compared to certain other languages (e.g., C). But any decent application written in Java, and run on a modern computer shouldn’t be leaving users with an impression of, “This is friggin’ slow!” If it does, then it’s more a problem with the application, rather than the language used to create it.

Gads, I loved that IDE, but I hated what it did with my computer’s resources. :stuck_out_tongue:
LilShieste

Any examples? The engineering software I use sure as hell hasn’t been proven.

Anyhow, verified <> correct. Hardware for many microprocessors does get verified, but there are still plenty of bugs. Has software done any better?

I wonder how much “slow” Java code is just shoddily written. It takes work to speed up software, much better to blame the problem on Java. I get good speeds with Perl scripts, even on large problems, by paying some attention to the code. Writing crap code is an easy habit to get into when for 99% of the time your machine is fast enough so that it won’t matter.

grumble in my day when we wrote assembler on 20 kbyte PDP-11s grumble