Subscribe: Javalobby - The heart of the Java developer community
Added By: Feedage Forager Feedage Grade A rated
Language: English
akka  boot  deployment jar  java  jep  kotlin  new  raw string  raw  spring boot  spring  streams  string literals  string 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Javalobby - The heart of the Java developer community

DZone Java Zone

Recent posts in Java on


CodeTalk: Where Java EE Lost Its Pace, Reasons to Be Optimistic About Jakarta [Podcast]

Wed, 21 Mar 2018 16:01:03 GMT

Thanks for tuning in to another episode of DZone's CodeTalk Podcast where you'll hear hosts Travis Van and Travis Carlson have early conversations with the creators of new developer technologies

Check back every Wednesday for a fresh episode, and if you're interested in being involved as a guest or have feedback for our hosts scroll down to the bottom for contact information.

Mastering Java 8 Streams (Part 1) [Video]

Wed, 21 Mar 2018 10:01:04 GMT

Java 8 Streams have been around for a while, but quite a few people still find streams to be a bit counter-intuitive and difficult to handle. It hasn't got to be that way and, in fact, being able to use streams reasonably is great for your code base.

This short, practical screencast is a quick, cookbook style intro on how to create streams and perform the most common tasks on them, like map, filter, distinct, and collect. 

Lightbend Podcast: sbt 1.x – The Past, Future, and Baby Steps

Wed, 21 Mar 2018 07:01:02 GMT

In this Lightbend podcast, we sit down with Marina Sigaeva (@BesseIFunction), a physicist, Scala engineer, and speaker of growing renown in the Scala community, and Dale Wijnand (@dwijnand), who is on Lightbend’s Tooling Team where he spends much of his day maintaining and writing about sbt.

Marina recently presented a talk called “SBT: Baby Steps”, so we asked to spend a bit of time with her and Dale discussing the latest on sbt, some of the history of this fascinating project, and see where things are heading in the future.

How Java EE Can Get Its Groove Back

Wed, 21 Mar 2018 04:01:02 GMT

One of the most intriguing developments in the Java landscape is the transition of governance of the Java EE platform from Oracle’s JCP process to Eclipse Foundation. We’re anticipating a reveal this summer of more details around the technical directions of Java EE from this new governance. To help DZone readers understand some of the key considerations ahead of how Java EE stays relevant in the new, distributed computing, cloud-native trends in enterprise computing, we caught up with Lightbend CTO, Akka creator and original author of the Reactive Manifesto, Jonas Bonér.

DZone: Other JVM languages like Scala — and the many frameworks that target distributed systems challenges like Akka — saw an opportunity to tackle use cases in new ways beyond the classic Java / Java EE approach. What would you say are some of the key ways that the Java ecosystem needs to evolve to keep evolving the Java / Java stack capabilities moving forward?

10 Java Interview Questions From Investment Banks

Tue, 20 Mar 2018 20:01:01 GMT

There are a lot of Java developers applying for Java development roles at investment banks like Barclays, Credit Suisse, Citibank etc, but many of them have no idea of what kind of questions are expected there.

In this article, I'll share some frequently asked questions from investment banks to Java developers of more than 3 years of experience. Yes, these questions are not for freshers or those with 1-2 years of Java experience — often, banks don't hire at that level via open interviews. Rather, they mostly join as graduate trainees.

New Parallax Control for Java (JavaFX)

Tue, 20 Mar 2018 16:01:02 GMT

Parallax is a visual effect where you combine two layered images moving at different speeds to achieve a sense of depth.

Think about when you're driving on the road and you see the trees close to you moving fast, whereas the trees that are further away will move in the same direction, but slower. The result is that you perceive the trees that are moving faster to be closer to you and the others to be further.

The Case of the Dreaded Interface

Tue, 20 Mar 2018 10:01:02 GMT

The Java/C# interface has a lot to answer for. Recently, someone told me that, "You can tell a design is coupled if it doesn't use interfaces." After a few follow-up questions, I realized that they were not talking about coding to well-defined contracts in general, but the Java or C# interfaces in particular. My next question was, "Should you have an interface even if there is only one implementation?" The answer was, "Yes if you think there may be more implementations in the future."

I disagree with this view.

A Kotlin Wishlist for Java

Tue, 20 Mar 2018 07:01:00 GMT

There is no doubt that Java has enjoyed a superior position when it comes to programming languages and is considered as one of the most important languages for development. However, there have been a number of languages developed on top of the JVM, like Kotlin.

Kotlin is a statically typed programming language for modern multi-platform applications. While I have been a Java developer for quite a long while, working on a project data-anonymization made me feel that there are things that Java should consider importing from Kotlin. 

Raw String Literals Coming to Java

Tue, 20 Mar 2018 04:01:00 GMT

It appears likely that "raw string literals" are coming to Java. JEP 326 ("Raw String Literals") started as Issue JDK-8196004 and was announced as a "new JEP candidate" on March 2. The JEP and associated issue point out that "Java remains one of a small group of contemporary programming languages that do not provide language-level support for raw strings." The JEP and associated issue specifically reference programming languages C, C++, C# ("verbatim"), Dart, Go, Groovy, Haskell, JavaScript, Kotlin, Perl, PHP, Python, R, Ruby, Scala, and Swift and the "Unix tools" bash, grep, and sed that were "surveyed for their delimiters and use of raw and multi-line strings." JEP 326's "Summary" provides an overview of the proposed Java raw string literals: "A raw string literal can span multiple lines of source code and does not interpret escape sequences, such as \n, or Unicode escapes, of the form \uXXXX." The "Motivations" section of this JEP adds, "This JEP proposes a new kind of literal, a raw string literal, which sets aside both Java escapes and Java line terminator specifications, to provide character sequences that under many circumstances are more readable and maintainable than the existing traditional string literal." JEP 326 does not introduce interpolation and, in fact, rules it out in its "Non-Goals" section: "Raw string literals do not directly support string interpolation. Interpolation may be considered in a future JEP."[...]

Changing the Default Port of Spring Boot Apps [Snippets]

Mon, 19 Mar 2018 20:01:01 GMT

By default, Spring Boot applications run on an embedded Tomcat via port 8080. In order to change the default port, you just need to modify the server.port attribute, which is automatically read at runtime by Spring Boot applications.

In this tutorial, we provide a few common ways of modifying the server.port attribute.

A Personal Opinion on the Future of Jakarta EE

Mon, 19 Mar 2018 07:01:01 GMT

The following is just my personal opinion of where Jakarta EE may be going. I am far removed from the decision makers and this opinion is based on what I have read and my experience as a teacher. Feel free to label me a crackpot.

I began to teach J2EE in 2002. It was a mess. Most of my time was spent on explaining the purpose of the numerous XML files and the three strange beans, session, session stateless, and EJB. Of course, this was in the days when it was thought that programs will be frequently reconfigured via their XML files and that pooling the strange beans was the state of the art. When I got a copy of Rod Johnson’s book J2EE Development without EJB, I thought that the concept was intriguing. However, I was required to teach what was most commonly used in industry, and at that time, it was J2EE.

Testing Kotlin With Spock (Part 1): Object

Mon, 19 Mar 2018 04:01:01 GMT

The object keyword in Kotlin creates a singleton in a very convenient way. It can be used, for example, as a state of an operation. Spock is one of the most expressive and readable test frameworks available in the Java ecosystem. Let's see how Kotlin's object can be used in Spock tests.

What Do We Want to Test?

We have a single method, validate, in our Validator interface that returns validation status: Ok or Error.

Doing Stuff With Spring WebFlux

Sun, 18 Mar 2018 05:01:02 GMT

Spring Boot 2.0 went GA recently, so I decided to write my first post about Spring in quite a while. Since the release, I have been seeing more and more mentions of Spring WebFlux along with tutorials on how to use it. But after reading through them and trying to get it working myself, I found it a bit hard to make the jump from the code included in the posts and tutorials I read to writing code that actually does something a tiny bit more interesting than returning a string from the back-end. Now, I’m hoping I’m not shooting myself in the foot by saying that, as you could probably make the same criticism of the code I use in this post, but here is my attempt to give a tutorial of Spring WebFlux that actually resembles something that you might use in the wild.

Before I continue, and after all this mentioning of WebFlux, what actually is it? Spring WebFlux is a fully non-blocking reactive alternative to Spring MVC. It allows better vertical scaling without increasing your hardware resources. Being reactive, it now makes use of Reactive Streams to allow asynchronous processing of data returned from calls to the server. This means we are going to see a lot less Lists, Collections, or even single objects. Instead, we'll see their reactive equivalents such as Flux and Mono (from Reactor). I’m not going to go in depth on what Reactive Streams are, as honestly, I need to look into it even more myself before I try to explain it to anyone. Instead, let's get back to focusing on WebFlux.

Streaming Microservices With Akka Streams and Kafka Streams [Webinar]

Sat, 17 Mar 2018 05:02:15 GMT

One of the most frequent questions that we at Lightbend have been asked is “what’s the difference between Akka Streams and Kafka Streams?” After all, there is only a 1 letter difference between these two technologies, so how different could they be?

Well, as we are about to learn, they are actually quite different. Both tools are part of Lightbend Fast Data Platform, but were created with entirely different technological approaches in mind. For example, Akka Streams emerged as a dataflow-centric abstraction for the Akka Actor model, designed for general-purpose microservices, very low-latency event processing, and supports a wider class of application problems and third-party integrations via Alpakka. Kafka Streams, by comparison, is purpose-built for reading data from Kafka topics, processing it, and writing the results to new topics in a Kafka-centric way.

Building Spring Boot 2.0 Apps: VS Code, Initializr, and Azure Starters

Fri, 16 Mar 2018 16:01:02 GMT

We are excited to announce full support of Spring Boot 2.0 on the Spring Boot Starters for Azure, already available on Spring Initializr. Plus, with new Java and Spring extensions for Visual Studio Code you can build production-ready apps and easily deploy them to the cloud.

Integrate Azure Services With Spring Boot 2.0 Apps

Spring Initializr enables developers to handle the dependency management and makes the bootstrapping process for Spring projects much easier. Today, we’re announcing that the Azure Starters have been updated to support Spring Boot 2.0, so you can easily integrate cloud services with your application.

Using Reactive Streams, Akka Streams, Akka HTTP, and Alpakka For Legacy Integrations

Fri, 16 Mar 2018 10:01:01 GMT

Software is turning more and more into individual services that provide value to individual consumers. It is a part of a greater whole, and in a typical enterprise, we see that multiple generations of technologies must co-exist for systems to function properly as a whole.

In addition to that, the need to integrate with existing systems is increasing. The technologies used can be WebServices, HTTP APIs, databases, or even external devices such as sensors.

Creating an AWS Lambda Deployment JAR Using Maven

Fri, 16 Mar 2018 07:01:02 GMT

One key aspect of AWS Lambda functions (with Java) is creating deployment packages (JAR or ZIP files) for uploading/deploying on the AWS Lambda service. In this post, you will learn different ways in which you can create a deployment JAR file for AWS Lambda projects using Maven. We will look at:

  • Deployment JAR using Maven and Eclipse IDE
  • Deployment JAR using Maven and the command prompt

I recommend using the "Maven and command prompt" technique for creating your deployment JAR package, but we will cover both methods.

Duke Takes His Last Tumble

Fri, 16 Mar 2018 04:01:01 GMT

When Java was first released, the world was a very different place. This was 1995, and the Internet and World Wide Web were still very much in their infancy. When James Gosling and John Gage demonstrated the WebRunner browser (as it was then called) running a Java applet that could rotate a molecule, the world changed. Suddenly, the web went from having only static content with hypertext links to a dynamic, interactive system.

From tiny acorns, mighty oak trees grow (if you’ll excuse the pun) and that’s precisely what we’ve seen with the web. Almost every aspect of our lives, from information access to banking to social interaction, now takes place through the Internet and the web. What we experience through the browser has changed beyond all recognition.

Java Version Upgrades: GC Overview

Thu, 15 Mar 2018 20:01:01 GMT

I'm guessing there are many companies on the verge of upgrading to a newer Java version because developers love to upgrade, but besides this adventurous attitude, there is also fear. The biggest fear of such a change is that applications can produce unexpected behaviors. In my opinion, the root of this fear is the GC system, the fear of the unknown. 

First, we will do a quick walkthrough of how memory management architecture looks, what kind of GC algorithms are available, and what GC types exist. We will then go over how to come up with a plan that is safe and can persuade management that switching to a newer Java version won't be the end of worlds. If you are pretty confident on how the GC works, you can skip to the end of the article where the TODOs are listed. For others, let's start with the architecture for the JVM.

This Week in Spring: Even More Spring Boot 2

Thu, 15 Mar 2018 16:01:01 GMT

Hi, Spring fans! Welcome to another installment of This Week in Spring! This week I’m in blizzard-besieged Boston, Massachusetts, for the epic Spring One Tour Boston event. Unfortunately, due to this crazy snow storm/blizzard, the event’s been postponed one day as we all grapple with the weather. Hope you were able to join the Spring Boot 2.0 launch webinar! If not the replay will be available here and don’t forget to check out the launch blog!

Snow or no snow! The show must go on, at least here on the Spring blog, so without further ado: