Announcement

Collapse
No announcement yet.

Why does Java suck so bad these days?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why does Java suck so bad these days?



    Get full-length product reviews, the latest news, tech coverage, daily deals, and category deep dives from CNET experts worldwide.


    Lately Java has been getting a bit of bad press, thanks to several consecutive security holes that have been exploited by malware developers. One notable occurrence was the Flashback malware threat that affected a number of OS X users, which (though due in part to Apple's negligence about Java upkeep) was rooted in the Java runtime. More recently, Java 7 has seen a new zero-day vulnerability that has been circulating in exploit kits.
    In response to these threats, many in the tech community have recommended that people uninstall Java altogether. However, this can be impractical for some, as many people need Java to run applications, including Web apps and a number of technical and creative development tools.

    When it comes to the security of your system, uninstalling Java completely is certainly one way to avoid problems arising from it, but it is a bit of an extreme measure. So, how do you secure your system while keeping a potentially faulty runtime installed?
    There are two aspects to Oracle's Java installation. The first is the runtime itself, which consists of the libraries and execution environment that allow your system to execute Java programs. The second component of the installation is the Web plug-in, which interfaces these libraries with the browser to allow hosted Web applets to run.

    In older versions of Java (1.6 or earlier) Safari's security preferences could be used to disable Java, but this is now done in the Java Control Panel in the system preferences.

    The vast majority of Java's security problems revolve around the use of the Java plug-in. While the vulnerabilities ultimately exist in the runtime, the plug-in is the avenue that malware developers use to exploit these remotely. You are somehow tricked into loading a Web page that contains a malicious Java applet, which exploits the fault and loads malware on to your system. If you close this off or otherwise manage it, then you will vastly improve the security of your system, and can continue to use Java for other purposes without needing to remove it completely.

    There are several ways to do this. In the latest Java runtime, you can access the Java Control Panel and in the security settings uncheck the option to "Enable Java content in the browser." This will effectively close the door between Java and Web sites you visit, so Java applets will not run. While technically the security vulnerabilities are still open with this setting, you would need to manually download a Java executable and purposely run it on your system.

    The second option is the use of security levels in determining which Java code is allowed to run. Similar to Apple's Gatekeeper feature in Mountain Lion, which can restrict running applications to signed code or apps specifically from the Mac App Store, Java's security levels can require that you approve any unsigned applications or even approve all code regardless of its signature. To do this, in the same Security section of the Java control panel, you can drag the security level slider to High, which allows only signed programs to run, or Very High, which requires approval for all code.

    Beyond Java's built-in security measures, you can also use some third-party tools to help prevent malicious Java applets from running on your system. While disabling the Java plug-in is perhaps best, if you regularly visit Web sites that require Java, then doing this can be a burden to your work flow. Therefore, one option is to instead use a plug-in manager such as ClickToPlugin that may block Java and other plugins like Flash. The benefit here is instead runnng of the blocked content, you'll receive a notification that you can click to quickly allow it to run. Also, you can customize a whitelist of sites that are automatically allowed to work. Do keep in mind that ClickToPlugin will not block all Java content since it cannot block specific "applet" tags so perhaps it should not be relied upon to manage Java in Safari, but it can be used to block other plugins until you specifically need them.

    Some browsers like Chrome come with a click-to-play option, which can be seen by going to Chrome's content settings (Copy and paste this URL into Chrome to get to these settings: chrome://chrome/settings/content#click) and selecting the "Click to play" option in the Plug-ins section. For those who use Firefox, the NoScript plug-in is a very effective approach to managing unwanted execution of plug-ins and other Web-based content.

    A final approach to help protect your system is to monitor outgoing traffic using a reverse firewall tool like Little Snitch. With such a tool installed, whenever a program tries to contact an external server, the system will notify you and give you options to allow or deny the attempt, and also provide you with information to investigate what process is making the request.

    Little Snitch in OS X

    When Little Snitch detects an outgoing connection, it will notify you and provide information on what the process is and who it is attempting to contact.
    (Credit: Objective Development)

    While this is a bit of a tangential approach to dealing with faults in Java, it has been a very useful and effective way to detect malicious behavior on systems in the past and was integral to the early detection of the Flashback malware in OS X. While such firewalls may not prevent malware from exploiting your system, they can prevent it from carrying out its primary purpose, which is to communicate personal information to an external server and open up unwanted command and control ports in the system.

    Overall, while Java has seen its fair share of problems and exploits recently, and although the most secure route is to uninstall Java and avoid using it, this is not necessary to keep your system secure. With plug-in management, higher security settings for Java, and reverse firewalls to detect malicious activity, you can still keep Java installed for the purposes you need while giving yourself an advantage in fighting the tricks that malware uses to cause problems in your system.
    Scouse Git (2) La Fayette Adam Smith Solomwi and Loinburger will not be forgotten.
    "Remember the night we broke the windows in this old house? This is what I wished for..."
    2015 APOLYTON FANTASY FOOTBALL CHAMPION!

  • #2
    Has someone hijacked Ben's account via a Java exploit?
    Graffiti in a public toilet
    Do not require skill or wit
    Among the **** we all are poets
    Among the poets we are ****.

    Comment


    • #3
      Java doesn't suck, you're an idiot.

      Though I am becoming more and more partial to C# as time goes by...but java will always have a special place in my heart
      If there is no sound in space, how come you can hear the lasers?
      ){ :|:& };:

      Comment


      • #4
        I only use INTERCAL
        <p style="font-size:1024px">HTML is disabled in signatures </p>

        Comment


        • #5
          Originally posted by Hauldren Collider View Post
          Though I am becoming more and more partial to C# as time goes by...but java will always have a special place in my heart
          C# is a better language than Java, in large part because it's not designed by a committee - the Java Community Process seems to have the effect of slowing language development to a crawl. Java's got a crapload of free libraries that help to make up for its deficiencies, but because there's never one single standard library for plugging a particular hole in the language you wind up using a Widget library from, say, Apache, but then down the line you pull in another library that's got a dependency on an incompatible Widget library from Google, and after awhile you wind up importing half of the maven central repository.

          The biggest problem I have with C# is Mono - I'm never able to run C# from Linux because I always need WCF / ASP.NET, which always takes friggin forever to get implemented in Mono.

          Right now I'm using Scala, which is more akin to C# than Java (in that Scala is a OO/functional hybrid, and C# has become sort of a OO/functional hybrid with stuff like Linq and with being compatible with F#) but runs on a JVM, and my only real complaint is that there's not a standard "Java library wrapper" - Scala uses an Option[T] instead of "null", so if you're using a Java library you've got to be careful to convert its nullable output into Options, which gets tedious and our junior programmers never do it right.
          Last edited by loinburger; February 15, 2014, 23:17.
          <p style="font-size:1024px">HTML is disabled in signatures </p>

          Comment


          • #6
            Yeah, I've observed the same things as well (except the Scala stuff, I've never used Scala). Java's generally a well-designed language but C# is just more modern. That said, Java runs on everything. C# is effectively windows-only.

            I've used F#. It has the same problems as all the SML type languages, which means it sucks, but the ability to link it to C# means it's quite nice--you can use it in the few cases where "pure functional" languages are actually convenient instead of a hassle, and use a real language for everything else.
            If there is no sound in space, how come you can hear the lasers?
            ){ :|:& };:

            Comment


            • #7
              The functional part of Scala is based on Haskell instead of ML, which has its advantages and disadvantages - Haskell has an interesting + powerful type system (but Scala usually doesn't hit you over the head with it, i.e. only rarely do I find the type system being a hindrance), but Haskell programmers are extremely obnoxious and Scala inherited a lot of them. This also means that you're more likely to find esoteric / theoretical Scala libraries (huzzah, a dependent type system, just what we didn't need!) than practical libraries (which means that you wind up using Java libraries, is why I wish the language had a standard Java library wrapper, but I'm not likely to get one because everybody is busy implementing dependent type systems).
              Last edited by loinburger; February 16, 2014, 00:28.
              <p style="font-size:1024px">HTML is disabled in signatures </p>

              Comment


              • #8
                Well, I hate Haskell as well. In my experience, both Haskell and ML are incredibly useless languages. The people who like them are some of the most obnoxious on the planet, too. They basically consist of every ivory tower academic asshole who ever wrote a paper on type and/or category theory.

                Don't get me wrong, they both have neat ideas--but almost all of those ideas can be added onto normal languages. In particular, closures, anonymous functions, algebraic data types, and so on. C# actually already has all of these.
                If there is no sound in space, how come you can hear the lasers?
                ){ :|:& };:

                Comment


                • #9
                  Originally posted by Hauldren Collider View Post
                  Java doesn't suck, you're an idiot.

                  Though I am becoming more and more partial to C# as time goes by...but java will always have a special place in my heart
                  I just want C# to have Java enums, then I'll be 100% happy. Oh, and builtin STM that transparently works with RDBMSs.
                  Graffiti in a public toilet
                  Do not require skill or wit
                  Among the **** we all are poets
                  Among the poets we are ****.

                  Comment


                  • #10
                    The other thing about C# is Visual Studio. After using it, I almost can't go back to Eclipse. It's hideous. But eclipse is pretty great considering it costs $0.00.
                    If there is no sound in space, how come you can hear the lasers?
                    ){ :|:& };:

                    Comment


                    • #11
                      Originally posted by onodera View Post
                      I just want C# to have Java enums, then I'll be 100% happy. Oh, and builtin STM that transparently works with RDBMSs.
                      Hm, I thought C# had enums? I actually haven't used it that much yet. The vast majority of my work is in Java still. Most of my C#/F# work is side projects in my free time.
                      If there is no sound in space, how come you can hear the lasers?
                      ){ :|:& };:

                      Comment


                      • #12
                        Has someone hijacked Ben's account via a Java exploit?
                        Don't I wish. I'd much rather it hack something worthless. HC, is there much talk about fixing some of the latest exploits where you're at? I've been hearing more folks complain recently?
                        Scouse Git (2) La Fayette Adam Smith Solomwi and Loinburger will not be forgotten.
                        "Remember the night we broke the windows in this old house? This is what I wished for..."
                        2015 APOLYTON FANTASY FOOTBALL CHAMPION!

                        Comment


                        • #13
                          Originally posted by Hauldren Collider View Post
                          The other thing about C# is Visual Studio. After using it, I almost can't go back to Eclipse. It's hideous. But eclipse is pretty great considering it costs $0.00.
                          Try IntelliJ - it does some things better and some things worse than Eclipse, so YMMV
                          <p style="font-size:1024px">HTML is disabled in signatures </p>

                          Comment


                          • #14
                            Originally posted by Hauldren Collider View Post
                            Hm, I thought C# had enums? I actually haven't used it that much yet. The vast majority of my work is in Java still. Most of my C#/F# work is side projects in my free time.
                            C# enums are sugar-coated ints, basically, while Java enums can have internal logic. You can emulate them with classes in .net, of course, but then you can emulate everything with branches and jumps...
                            Graffiti in a public toilet
                            Do not require skill or wit
                            Among the **** we all are poets
                            Among the poets we are ****.

                            Comment


                            • #15
                              C# > Java, as a language.

                              C++ remains my favorite language. Especially with C++11, which gives it some much-needed modernization.

                              Visual Studio is good, but I have a love/hate relationship with it. It seems to crap the bed with large solutions (we have 135 projects in our solution, some C# and most C++, with over 2 million lines of code). Performance is atrocious, even on decent dev boxes (Core i7 4770, 32GB of RAM, RAID0 SSD). In VS2010, if we use "Go To Definition" on a function it, literally, takes 10 minutes. This was fixed in VS2012 & 2013 so in most cases it's only a few seconds, but we still hold our breath each time we use it as maybe 15% of the time you'll get a hang now.

                              The VC++ compiler is also miles behind clang/llvm, which is what we use on Mac, Linux, and iOS. Still waiting on full C++ support in VS. LLVM's static analysis, compile times, and language support are pretty amazing. The best feature, though, is they have awesome error messages. Far more useful than anyone else's.

                              I've recently found myself using Sublime Text 3 and MSBuild instead on Windows, and I'm ridiculously productive with it. I only switch back into VS for debugging.

                              Sublime Text 3 also gives me the same IDE on all three OSes we develop on.
                              "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                              Ben Kenobi: "That means I'm doing something right. "

                              Comment

                              Working...
                              X