26 Jun 2019

feedDZone Java Zone

Java Class Name Locator in Selenium

The CSS Locator in Selenium is one of the most important aspects of writing a script. If you cannot locate an element by using any CSS locator in Selenium, then being proficient at Selenium automation will be a tough task. Selenium provides multiple ways of locating an element.

I have written a complete guide to help illustrate the practical demonstration of CSS locator in Selenium.

26 Jun 2019 4:01pm GMT

A Bootiful Podcast: IBM's Pratik Patel on Java, Functions-as-a-Service, Cloud Infrastructure, Spring, and More

Hi, Spring fans! This week, Josh Long (@starbuxman) speaks to @IBM's Pratik Patel (@prpatel) about function-as-a-service, Spring Cloud Function, Spring, Java, and Devnexus. Check it out.

26 Jun 2019 10:01am GMT

Top 10 Spring Boot Interview Questions

In this article, we will discuss some top 10 interview questions in Spring Boot. These questions are a bit tricky and trending heavily, nowadays, in the job market.

1) What does the @SpringBootApplication annotation do internally?

26 Jun 2019 7:01am GMT

Java: Hello World at Platform.sh

Recently, Platform.sh announced support for Java technologies. And in this post, we'll cover how easy it is to either create or move your Java application to Platform.sh.

A quick refresher: a second-generation Platform-as-a-Service, Platform.sh is built especially for continuous deployment. With Platform.sh, you can host web applications in the cloud while making your development and testing workflows more productive. As the premier tool for developing and delivering applications in Drupal, WordPress, Symfony, Typo3, EZ, and Magento, Platform.sh also supports an array of languages, including PHP, Node.js, Python, Ruby, and Go.

26 Jun 2019 4:01am GMT

25 Jun 2019

feedDZone Java Zone

Beginners Guide: Building an Online Retail Web Shop

With the release of Red Hat Decision Manager 7.3, I've started updating my free online workshop, a beginners guide to building an online retail web shop workshop.

This update is the first of two labs in this workshop, with more to follow, that installs Red Hat Decision Manager on your laptop. After the installation, you'll start by creating a new project for the online retail web shop you'll be building in subsequent labs.

25 Jun 2019 7:52pm GMT

How to Import a Maven Spring Boot Application in Eclipse [Video]

In the video below, we take a closer look at how to import the Maven Spring Boot application in Eclipse. Let's get started!

Check out the links below to download the code and PPT:

25 Jun 2019 10:01am GMT

Java Multi-Threading With the ExecutorService

In this post, we'll look at how theExeutorService can be used to run multi-threaded asynchronous tasks. We'll start by creating threads directly and then move on to explore the ExeutorService and how it can be used to simplify things.

Creating Threads Directly

Before the Executor API came along, developers were responsible for instantiating and managing threads directly. Let's look at a simple example below.

25 Jun 2019 7:01am GMT

Spring Boot: Metrics With Micrometer and AWS CloudWatch

Some time ago, I wrote a blog on how to configure CloudWatch metrics with Spring Boot. It was all before micrometer and depended heavily on Netflix Servo Metrics. Time was slowly passing and civilizations prospered, but it's still difficult to find info on how to make Spring Boot work with Micrometer CloudWatch.
So, here it goes.

TL;DR

If you are not interested in why and just want to make Spring Boot work with AWS CloudWatch, do the following:

25 Jun 2019 4:01am GMT

24 Jun 2019

feedDZone Java Zone

Working With Filters in Spring

In this article, I am going to talk about how to best implement filters over HTTP requests in Spring. That is, assuming we have a program listening in a URI, we can specify that we want to execute something before the requests are processed by the controller.

This is very useful if we want all the requests to meet a requirement, for example, that they must include a specific header.

24 Jun 2019 8:16pm GMT

[Kotlin Pearls] Extensions: The Good, the Bad, and the Ugly


Extension Functions (and properties) are a new thing for Java developers; they are present in C# since long but they landed in the JVM land for the first time by courtesy of Kotlin.

Working on big Kotlin codebase and browsing through open-source Kotlin code, I have noticed some recurring cases where extensions are useful to improve code readability and some cases where they make the code more difficult to understand.

This is also a hot topic of discussions in teams that are starting Kotlin for the first time, so I think there is some value to make a summary here of what it did work well in my experience and what it didn't.

24 Jun 2019 4:01pm GMT

Love It or Hate It, Java Continues to Evolve

TechRepublic recently published an article about languages that developers love and those that they hate. This produced an interesting set of results since Java was the third most loved language as well as the second most hated. Clearly, Java, as a language, polarizes opinion. When I tweeted about this, I got one reply that quoted Bjarne Stroustrup, the creator of C++:

"There are only two kinds of languages: the ones people complain about and the ones nobody uses."

I think he has a point.

24 Jun 2019 12:58pm GMT

How to Easily Create Lists, Sets, and Maps in Java [Video]

Learn how easy it is to create lists, sets, and maps up until Java 8, and from Java 9 onwards.

24 Jun 2019 10:01am GMT

Why Is Combining Thread-Safe Methods an Error?

Combining dependent thread-safe methods leads to race conditions. Only when the methods do not depend on each other, we can combine them in a thread-safe way.

Why is combining thread-safe methods an error? And what does this tell us about how to use thread-safe classes?

24 Jun 2019 7:01am GMT

The False Hope of Managing Effects With Tagless-Final in Scala (Part 3)

Tagless-final is a technique originally used to embed domain-specific languages into a host language, without the use of Generalized Algebraic Data Types.

In the Haskell community, tagless-final still refers to a way of creating polymorphic programs in a custom DSL that are interpreted by instantiating them to a concrete data type. In the Scala community, however, tagless-final is used almost exclusively for monadic, effectful DSLs. Usage of the term in Scala is closest to what Haskeller's mean by MTL-style, but without the algebraic laws that govern MTL type classes.

24 Jun 2019 4:01am GMT

21 Jun 2019

feedDZone Java Zone

Docker Snafu Leads to Millions of Downloads of Vulnerable JDK

Attention to detail matters, folks.

If you're one of the more than ten million developers who downloaded the official Docker images for OpenJDK 8 and 11 from mid April until about a month ago, you'll really want to make sure you get those updated stat.

Due to innocent enough confusion over tagging protocols, Debian volunteers populated their repos with unreleased versions of the JDKs some weeks before the final versions were ready to go, but failed to clearly label them as such.

21 Jun 2019 9:02pm GMT

Converting Objects to Map and Back

In large enterprise applications, sometimes, we need to convert data objects to and from Map. Usually, it is an intermediate step to a special serialization. If it is possible to use something standard, then it is better to use that, but many times, the architecture envisioned by some lead architect, the rigid environment, or some similar reason does not make it possible to use JOOQ, Hibernate, Jackson, JAX, or something similar. In such a situation, as it happened to me a few years ago, we have to convert the objects to some proprietary format being string or binary, and the first step towards that direction is to convert the object to a Map.

Eventually, the conversion is more complex than just:

21 Jun 2019 4:01pm GMT

10 Nov 2011

feedPlanetJava

OSDir.com - Java: Red Hat's top secret Java Killer/Successor: The Ceylon Project

From the Ceylon dept.:

Gavin King of Red Hat/Hibernate/Seam fame recently unveiled the top secret project that he has been working on over the past two years, a new language and SDK designed to replace Java in the enterprise. The project came out of hiding without much fanfare or publicity at QCon Beijing in a keynote titled "The Ceylon Project - the next generation of Java language?".

10 Nov 2011 6:01am GMT

OSDir.com - Java: Oracle Introduces New Java Specification Requests to Evolve Java Community Process

From the Yet Another dept.:

To further its commitment to the Java Community Process (JCP), Oracle has submitted the first of two Java Specification Requests (JSRs) to update and revitalize the JCP.

10 Nov 2011 6:01am GMT

OSDir.com - Java: No copied Java code or weapons of mass destruction found in Android

From the Fact Checking dept.:

ZDNET: Sometimes the sheer wrongness of what is posted on the web leaves us speechless. Especially when it's picked up and repeated as gospel by otherwise reputable sites like Engadget. "Google copied Oracle's Java code, pasted in a new license, and shipped it," they reported this morning.



Sorry, but that just isn't true.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Java SE 7 Released

From the Grande dept.:

Oracle today announced the availability of Java Platform, Standard Edition 7 (Java SE 7), the first release of the Java platform under Oracle stewardship.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Java SE 7 Passes JCP

From the Jitters dept.:

The next edition of Java has been approved by a Java Community Process executive committee, but not without some acrimony.

10 Nov 2011 6:01am GMT

OSDir.com - Java: JDK 7 RC1 Released

From the JDK dept.:

After an initial round of testing we've declared build 147 to be the first Release Candidate of JDK 7.



There are only thirteen changes in this build. Over half of them are administrivial updates that don't affect the actual code; the remainder are true showstoppers, including several hard VM crashes and a JIT correctness bug identified by an Eclipse unit test.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Google Files Sizzling Answer to Oracle's Amended Java Complaint

From the Counter dept.:

Google has filed its answer to Oracle's amended complaint and its memorandum opposing Oracle's Motion to Dismiss. And we find out why Google didn't just roll over and pay Oracle for a license. Oracle asked in its motion to dismiss that the counterclaims alleging that Oracle's patents are invalid be dismissed. So Google explains more thoroughly why it believes they are in fact invalid. First, Google asserts:



Each of the Patents-in-Suit is invalid under 35 U.S.C. ยง 101 because one or more claims are directed to abstract ideas or other non-statutory subject matter.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Apache loses Java showdown vote to Oracle

From the Dis Harmony dept.:

The Apache Software Foundation - one of tech's most influential open-source groups - is closer to quitting Java's governing body after losing a stand-off vote against Oracle on Java.



The Reg has learned that with 75 per cent of qualifying Java Community Process (JCP) members having voted on whether to ratify Oracle's proposed roadmap for Java 7 and 8, Oracle's plan has been accepted.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Apache Software Foundation Resigns from Java Community Process

From the So Long dept.:

The Apache Software Foundation has resigned its seat on the Java SE/EE Executive Committee. Apache has served on the EC for the past 10 years, winning the JCP "Member of the Year" award 4 times, and recently was ratified for another term with support from 95% of the voting community. Further, the project communities of the ASF, home to Apache Tomcat, Ant, Xerces, Geronimo, Velocity and nearly a 100 mainstay java components have implemented countless JSRs and serve on and contribute to many of the JCPs technical expert groups.



We'd like to provide some explanation to the community as to why we're taking this significant step.



The recent Java SE 7 vote was the last chance for the JCP EC to demonstrate that the EC has any intent to defend the JCP as an open specification process, and demonstrate that the letter and spirit of the law matter. To sum up the issues at stake in the vote, we believe that while continuing to fail to uphold their responsibilities under the JSPA, Oracle provided the EC with a Java SE 7 specification request and license that are self-contradictory, severely restrict distribution of independent implementations of the spec, and most importantly, prohibit the distribution of independent open source implementations of the spec. Oracle has refused to answer any reasonable and responsible questions from the EC regarding these problems.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Apache Discontinues Independent Java Implementation 'Harmony'

From the DisHarmony dept.:

After the resignation of Apache from the Java SE/EE Executive Committee, the time has now come for Harmony to be added to the Apache Attic. Harmony was 'the project to produce an open source cleanroom implementation of Java.' An open vote was taken within the Project Management Committee, which resulted in a 20-2 majority to discontinue development.

10 Nov 2011 6:01am GMT

Javable: YourKit Java Profiler 7.0 released

The major update to YourKit Java Profiler has been released. Version 7.0 includes

10 Nov 2011 6:01am GMT

Javable: Sun phases out mobile Java

Sun will gradually phase out mobile Java (Java Micro Edition) and move respective services to Standard Edition. "We're trying to converge

10 Nov 2011 6:01am GMT

Javable: Google Android SDK is available

The development kit and API for Google mobile platform, Android, has been released.

10 Nov 2011 6:01am GMT

Javable: Consumer JRE Early Access

Sun has started an early access program to Java SE 6 Update N (formerly known as the "Consumer

10 Nov 2011 6:01am GMT

Javable: NetBeans 6.0 released

New version of pure Java IDE has been released, with support for many new

10 Nov 2011 6:01am GMT

Javable: Happy New Year!

We wish a Happy New Year to all our readers and contributers. Hope to see you all in 2008.

10 Nov 2011 6:01am GMT