6.5 million software developers and still going strong

Java Developer Magazine

Subscribe to Java Developer Magazine: eMailAlertsEmail Alerts newslettersWeekly Newsletters
Get Java Developer Magazine: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Top Stories

Solving the XML Problem with Jackson By Eugen Paraschiv Jackson is a popular library for handling JSON in Java applications, quickly becoming the de-facto standard in the ecosystem. Starting with version 2, it has also introduced a mature XML implementation alongside its established JSON support. Adding Jackson XML to the Project Adding the Jackson XML module to the project only needs a single dependency - the Jackson XML module itself: com.fasterxml.jackson.dataformat jackson-dataformat-xml 2.9.0 And in Gradle: compile "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.0" This will automatically pull in all of the other Jackson dependencies that are needed: Jackson Core Jackson Annotations Jackson Databind Jackson Module JAXB Annotations Woodstox StAX Implementation Not... (more)

Java Heap Space vs. Stack Memory | @CloudExpo #JVM #JRE #Java #AI #DX

Java Heap Space vs. Stack Memory: How Java Applications Allocate Memory By Angela Stringfellow Java applications need a certain amount of RAM on a computer to run. Each time an object or variable is declared, it needs more RAM. Simply designating enough memory to hold every value declared and run each method would lead to a bloated application. To keep application memory requirements lean, it is partitioned in ways that require less memory and allows the application to run more quickly. The Java Virtual Machine (JVM) divides memory between Java Heap Space and Java Stack Memory in a way that only uses memory that's needed. What Is Java Heap Space It is created by the Java Virtual Machine when it starts. The memory is used as long as the application is running. Java runtime uses it to allocate memory to objects and Java Runtime Environment (JRE) classes. When an object i... (more)

Major Java Software Flaw Found, Patched

Oracle fixed a security flaw in its Java software on Sunday, after the Department of Homeland Security warned users to disable Java software completely, citing a security hole that allows hackers to take control of their machines. “Java 7 Update 10 and earlier contain an unspecified vulnerability that can allow a remote, unauthenticated attacker to execute arbitrary code on a vulnerable system,” the agency said in an alert issued last week. “This and previous Java vulnerabilities have been widely targeted by attackers, and new Java vulnerabilities are likely to be discovered.” A European security researcher who blogs under the name Kafeine first discovered the vulnerability and posted it to his blog in a rare alert on Thursday. The homeland security agency said that it had confirmed that Microsoft Windows, Apple’s Mac OS X and Linux platforms were all affected and... (more)

Finally Getting the Most out of the Java Thread Pool | @CloudExpo #JVM #Java #Cloud

Finally Getting the Most out of the Java Thread Pool By Eugen Paraschiv First, let's outline a frame of reference for multithreading and why we may need to use a thread pool. A thread is an execution context that can run a set of instructions within a process - aka a running program. Multithreaded programming refers to using threads to execute multiple tasks concurrently. Of course, this paradigm is well supported on the JVM. Although this brings several advantages, primarily regarding the performance of a program, multithreaded programming can also have disadvantages - such as increased complexity of the code, concurrency issues, unexpected results and adding the overhead of thread creation. In this article, we're going to take a closer look at how the latter issue can be mitigated by using thread pools in Java. Why Use a Thread Pool? Creating and starting a thread ... (more)

Mistakes to Avoid When Handling Java Exceptions | @CloudExpo #Java #Cloud #Analytics

Seven Common Mistakes You Should Avoid When Handling Java Exceptions By Thorben Janssen Handling an exception is one of the most common but not necessarily one of the easiest tasks. It is still one of the frequently discussed topics in experienced teams, and there are several best practices and common mistakes you should be aware of. Here are a few things you should avoid when handling exceptions in your application. Mistake 1: Specify a java.lang.Exception or java.lang.Throwable As I explained in one of my previous posts, you either need to specify or handle a checked exception. But checked exceptions are not the only ones you can specify. You can use any subclass of java.lang.Throwable in a throws clause. So, instead of specifying the two different exceptions that are thrown by the following code snippet, you could just use the java.lang.Exception in the throws cla... (more)

Java Web Services Tutorial | @CloudExpo #DevOps #API #Java #Microservices

Java Web Services Tutorial: Improve App Communication and Flexibility By Eugen Paraschiv Web services have taken the development world by storm, especially in recent years as they've become more and more widely adopted. There are naturally many reasons for this, but first, let's understand what exactly a web service is. The World Wide Web Consortium (W3C) defines "web of services" as "message-based design frequently found on the Web and in enterprise software". Basically, a web service is a method of sending a message between two devices through a network. In practical terms, this translates to an application which outputs communication in a standardized format for other client applications to receive and act on. Web services have been adopted so quickly because they bring several important advantages: Allow communication and interoperability between applications r... (more)

I’m Not Scared of #DevOps | @DevOpsSummit #APM #CD #Docker #Monitoring

DevOps is speeding towards the IT world like a freight train and the hype around it is deafening. There is no reason to be afraid of this change as it is the natural reaction to the agile movement that revolutionized development just a few years ago. By definition, DevOps is the natural alignment of IT performance to business profitability. The relevance of this has yet to be quantified but it has been suggested that the route to the CEO's chair will come from the IT leaders that successfully make the transition to a DevOps model. If this still seems foreign to you, I recommend reading up on DevOps Blog from IT Revolution, the OpsCode Blog, and check out The Phoenix Project. Despite all the talk around simple monitoring tools, breaking through the walls between Dev and Ops still poses a real challenge. This is because of a misunderstanding around Operations real purp... (more)

[session] Going #Serverless the Amazon #Lambda Way? | @CloudExpo @CAinc #AWS

Going Serverless the Amazon Lambda Way? Stay Calm and Monitor On! While some vendors scramble to create and sell you a fancy solution for monitoring your spanking new Amazon Lambdas, hear how you can do it on the cheap using just built-in Java APIs yourself. By exploiting a little-known fact that Lambdas aren't exactly single threaded, you can effectively identify hot spots in your serverless code. In his session at 20th Cloud Expo, David Martin, Principal Product Owner at CA Technologies, will give a live demonstration and code walkthrough, showing how to overcome the challenges of monitoring S3 and RDS. He will provide an overview of necessary Amazon Lambda concepts and discuss how to integrate the monitoring data with other tools. This presentation is for experienced Java coders, but does not require any familiarity with Amazon Lambdas specifically. Speaker Bio ... (more)

What Is Java #DevOps? | @DevOpsSummit #CloudNative #Serverless #AI #DX

What is Java DevOps? Benefits, Considerations, Tutorials and More By Angela Stringfellow DevOps sees the coming together of practices, philosophies, and tools that allow you to create services and applications very quickly. This means that you can improve on your apps and evolve them at a much faster rate than those developers who are using traditional software development processes. We’ve talked about DevOps, in general, a great deal, but today, we’re going to dig a little deeper and take a look at Java DevOps specifically. What Is DevOps? DevOps is simply a portmanteau of software DEVelopment and IT OPerations. It was first called agile operations and involves different disciplines in building, operating and evolving applications and services. Using a DevOps model, you are bringing together your development team and your operations team, and their work is no longer i... (more)

Revisiting Java SE 7 Features | @CloudExpo #Java #Cloud #OpenSource

Preparing for an interview? Want to just revisit Java SE 7 features? Trying to recollect or revise a Java SE programming construct? Let me take you back in time to what was introduced first in Java SE 7? Join me for this tutorial series on Java as we all eagerly await the official release of Java SE 9. Java SE 7 Release Date: 28-07-2011 Java SE 7 Code Name: Dolphin Java SE 7 Highlights Strings in switch statements. Automatic resource management in try statements. Improved type inference for generic instance creation, AKA the diamond operator <>. Simplified varargs method declaration. Binary integer literals. Allowing underscores in numeric literals. Catching multiple exception types and rethrowing exceptions with improved type checking. I have provided some of the most important core language enhancements for JDK 7.0, along with code samples. The examples provided bel... (more)

How Memory Leaks Happen in a Java Application | @CloudExpo #JVM #Java #Virtualization

How Memory Leaks Happen in a Java Application By Eugen Paraschiv Introduction to Memory Leaks In Java Apps One of the core benefits of Java is the JVM, which is an out-of-the-box memory management. Essentially, we can create objects and the Java Garbage Collector will take care of allocating and freeing up memory for us. Nevertheless, memory leaks can still occur in Java applications. In this article, we're going to describe the most common memory leaks, understand their causes, and look at a few techniques to detect/avoid them. We're also going to use the Java YourKit profiler throughout the article, to analyze the state of our memory at runtime. 1. What is a Memory Leak in Java? The standard definition of a memory leak is a scenario that occurs when objects are no longer being used by the application, but the Garbage Collector is unable to remove them from working mem... (more)