JUnit 5 @AfterAll Annotation Example

Apr 23 3:30pm HowToDoInJava
JUnit 5 @AfterAll annotation is replacement of @AfterClass annotation in JUnit 4. The annotated method should be executed after all tests in test class. The post JUnit 5 @AfterAll Annotation Example appeared first on HowToDoInJava.
Read More

Hyperledger Steering Committee Approves First Ethereum Project

Apr 23 1:50pm InfoQ
In a recent blog post on the Hyperledger project website, Brian Behlendorf, executive director of the Hyperledger project, announced the Hyperledger Technical Steering Committee has approved a proposal, submitted by Monax and Intel, to incubate the first Ethereum derived project called Burrow; a permissionable smart contract machine. By Kent Weare...
Read More

3 Steps to Writing and Reading XML Files

Apr 23 11:01am DZone Java Zone
To read or write XML files, you should consider JAXB (Java Architecture for XML Binding). JAXB will convert and reconvert XML objects using marshalling (writing to XML) and unmarshalling processes. When and Where Do I Need to Write XML Files? Creating a Custom Configuration or UI File Suppose, in a project, you need to customize the User Data for each field or configure the system’s database to your standard.
Read More

How New Relic Does DevOps

Apr 23 9:30am InfoQ
A lead software engineer at New Relic wrote a summary of how DevOps tools and practices are used and practised in the New Relic engineering team. It talks about the evolution of the DevOps role, using their own product for monitoring and the visible benefits of this culture. By Hrishikesh Barua...
Read More

Nikita Ivanov on Apache Ignite In-Memory Computing Platform

Apr 23 8:00am InfoQ
Apache Ignite is an in-memory computing platform with transactional support, that supports both key-value persistence as well as streaming and complex-event processing. Ignite was open-sourced by GridGain in late 2014 and accepted in the Apache Incubator program. InfoQ interviewed Nikita Ivanov, CTO of GridGain, to find out more about Apache Ignite. By Alexandre Rodrigues...
Read More

Building Java (and Android) Apps on the Blockchain [Slideshow]

Apr 23 1:01am DZone Java Zone
I gave a tech talk at Pivotal Labs today on developing Java applications on the Ethereum blockchain. The slides are available below.
Read More

voc 0.1.3

Apr 22 11:59pm Java News
Compiles Python 3.4 source files into Java class files, enabling you to run Python code on a JVM . It isn't a completely compliant Python 3.4 implementation - there are some language features that still need to be implemented, and there is only a bare bones standard library implementation.
Read More

Future Proofing Clientside Codebase

Apr 22 7:13pm Java News
I currently develop my codebase serverside in Java . SFS will likely be the best multiplayer Java socket server for the next couple decades at least.
Read More

Q&A with Marcin Grzejszczak on Spring Cloud Contract

Apr 22 11:05am InfoQ
Marcin Grzejszczak is a software engineer at Pivotal. Currently, he is working on Spring Cloud Contract, a consumer-driven contracts framework for Java. InfoQ have interviewed Marcin in order to discuss some of the framework's benefits, and how in particular consumer-driven contracts can help with microservice testing. By Andrew Morgan...
Read More

Article: People Re-engineering How-tos: Mentoring As A Service

Apr 22 6:52am InfoQ
The software industry revamps half of its people every five years with fresh grads, causing a state of Perpetual Inexperience. People Reengineering proposes Mentorship As A Service to fight this phenomena through one of its threads of action that seamlessly instills professional maturity into the new generations for better performance and people retention. By Medhat Sabry...
Read More

Java 9 (Part 2): JShell Step by Step

Apr 22 1:01am DZone Java Zone
In Part 1 of this Java 9 tutorial series, we covered Java 9 modules. Here in Part 2 of this series, we are going to explore JShell. Any up-to-date programming language has a REPL. In today's world, where you have two-week sprints and you need to learn while coding, it's important to have a fast feedback loop. You don’t want to set up a whole project just to test something in the code, right? The REPL brings that to you. REPLs are common in Scala, Python, Ruby, Shell scripts, and now also in… Java! Java 9 has the following new features:...
Read More

Presentation: Disciplined Agile Business Agility - One Size Does Not Fit All

Apr 21 9:17pm InfoQ
Scott Ambler introduces the DA framework, describing strategies at the enterprise level currently being applied in organizations around the world. By Scott Ambler...
Read More

Kotlin and Java EE (Part 1)

Apr 21 4:44pm DZone Java Zone
One of the main strengths of Kotlin is good Java integration. As it is fairly easy to convert Java to Kotlin, it seems that making Java EE applications in Kotlin should be a no-brainer. However, there are some subtle differences between the two that make conversion tricky: While most frameworks require non-final classes, Kotlin classes are final. Injection will introduce a lot of unnecessary null checks. Both of these and mandatory parameterless constructors will ruin attempts to write functional-style code. Java EE and Kotlin are not really best friends unless you make them. Luckily, all those issues can be avoided.
Read More

Catching Exceptions in Scala (Part 2)

Apr 21 4:01pm DZone Java Zone
It’s time to continue our previous blog on how to make our code more robust, concise, and more functionally defined at the same time. Here, we are moving more toward Scala and leaving traditional Java behind. We will see new types and their usage along with the benefits we get from them. This blog will show you the best way, in my perspective, to handle the exceptions gracefully in Scala (the beloved coding language for everyone here at Knoldus). Our methods would only be responsible for either returning the results or the exceptions, i.e. we will not write any try-catch blocks to handle the exceptions within different methods.
Read More

Amazon Improves Beta Testing for Alexa Skills

Apr 21 3:00pm InfoQ
Amazon has announced a new testing tool to allow developers to make their Alexa skills available to closed groups of beta testers before they are published and collect feedback from them. By Sergio De Simone...
Read More

75% off Lamicall S1 Cell Phone Dock - Deal Alert

Apr 21 11:32am JavaWorld
Designed on a low center of gravity makes it stable. The extended hooks keep the phone in safety, and rubber cushions protect the phone from scratches and sliding. Suitable height, perfect angle of view when using Facetime and YouTube, makes it so easy to read message and emails. Compatible with iPhone and Android phones even when they have an added case.  The doc averages 4.8 out of 5 stars from over 4,500 reviewers on Amazon (86\% rate a full 5 stars: see reviews), where its typical list price of $36.99 has been reduced 19\% to $29.99. See this deal on Amazon.To read this article in full or to leave a comment, please click here...
Read More

Article: From Alibaba to Apache: RocketMQs Past, Present, and Future

Apr 21 6:33am InfoQ
Feng Jia and Wang Xiaorui share the core distributed systems principals behind RocketMQ, Alibaba's a distributed messaging and data streaming platform now open sourced through the Apache Foundation. By Wang Xiaorui, Feng Jia...
Read More

Poor Man's Console MVC

Apr 21 6:01am DZone Java Zone
After two posts of pure theory about the MVC Pattern Language, I was looking to provide some practical examples. The technical part is easy – everybody already knows how to implement that in various ways, but I couldn’t figure out how to show the whole mental models part of it. In the end, I came up with what follows – an MVC “Pet Clinic” in the console! As we learned in the previous posts, on the idea level, MVC is most concerned with understanding the user’s way of thinking. Therefore, we won’t jump straight into code here. Instead, we’ll visit a real pet clinic on the outskirts of your town and watch our user at work.
Read More

Reset, Checkout, and Revert

Apr 21 3:01am DZone Java Zone
The git reset, git checkout, and git revert commands are some of the most useful tools in your Git toolbox. They all let you undo some kind of change in your repository, and the first two commands can be used to manipulate either commits or individual files. Because they’re so similar, it’s very easy to mix up which command should be used in any given development scenario. In this article, we’ll compare the most common configurations of git reset, git checkout, and git revert. Hopefully, you’ll walk away with the confidence to navigate your repository using any of these commands.
Read More

Spring Boot and Mustache default value

Apr 21 1:01am Mkyong.com
In Spring Boot + Mustache template environment, if we didn’t assign a value to a {{variable}} on the Mustache’s page, the jmustache will throws the following error messages : com.samskivert.mustache.MustacheException$Context: No method or field with name 'variable' on line xx at com.samskivert.mustache.Template.checkForMissing(Template.java:316) ~[jmustache-1.13.jar:na] at com.samskivert.mustache.Template.getValue(Template.java:224) ~[jmustache-1.13.jar:na] at com.samskivert.mustache.Template.getValueOrDefault(Template.java:269) ~[jmustache-1.13.jar:na] P.S Tested with Spring Boot 1.5.2.RELEASE […]...
Read More

Java Finalizer and Java File Input/Output Streams

Apr 21 12:01am DZone Java Zone
I often find myself noticing topics online more after I've worked directly with them or spent time learning about them. The recent Stephen Connolly (CloudBees) post FileInputStream / FileOutputStream Considered Harmful caught my attention because of my recent issues with Java's finalizer. In that post, the author talks about potential consequences of java.io.FileInputStream and java.io.FileOutputStream implementing overridden finalize() methods FileInputStream.finalize() and FileOutputStream.finalize(). With talk of deprecating the finalizer in JDK 9, my perspective is that a subject I had not thought about in years is all of a sudden all around me. Connolly's post references the Hadoop JIRA HDFS-8562 ("HDFS Performance is impacted by FileInputStream Finalizer"). That JIRA was opened in June 2015 and its description includes interesting background on why the finalizer of FileInputStream causes issues for those using HDFS. This JIRA is also interesting because it looks at why it's not trivial to change FileInputStream and FileOutputStream to not use the protectedfinalize() methods.
Read More

Learn GRAKN.AI With Java

Apr 21 12:01am DZone Java Zone
So far on this blog, we have mostly given coding examples that use our declarative query language, Graql, though we’ve also briefly covered Python, R, and Haskell. In this blog post, I’m going to share some details of how to use Java in a basic example that can be extended as a template for your own projects. I’ll describe briefly how to get set up, then how to build up an ontology, add data and how to make some queries. To dive further into developing on GRAKN.AI with Java, I recommend you also take a look at the documentation on the Java APIs, and our growing set of Javadocs, which are under development. What Is GRAKN.AI? GRAKN.AI is a database for AI. AI systems need a knowledge base to manage their data because they produce and consume more complex information than average software. GRAKN.AI is a database in the form of a distributed knowledge base with a reasoning query language that allows you to model, verify, scale, query and analyze complex data easily. By providing a query language that uses machine reasoning to uncover knowledge too complex to infer with human cognition, GRAKN.AI allows organizations to grow their competitive advantage, all the while reducing engineering time, cost, and complexity. Why Java? The GRAKN.AI codebase is written in Java, and is open-source and available on GitHub. You have a natural advantage if you use the Java APIs to work with a graph:...
Read More

Hibernate Tips: How to validate that an entity attribute value is within a defined range

Apr 21 12:00am Thoughts on Java
Hibernate Tips is a series of posts in which I describe a quick and easy solution for common Hibernate questions. If you have a question you like me to answer, please leave a comment below.   Question: The value of one of the attributes of my entity has to be within a defined range. What […] The post Hibernate Tips: How to validate that an entity attribute value is within a defined range appeared first on Thoughts on Java.
Read More

Presentation: Building Reliability in an Unreliable World

Apr 20 10:14pm InfoQ
Greg Murphy describes how GameSparks have designed their platform to be tolerant of many things: unreliable and slow internet connectivity, cloud resources that can fail without warning or suffer performance degradation, poorly-performing or resource-heavy customer code in a multi-tenant environment. By Greg Murphy...
Read More

Presentation: Challenging Perceptions of NHS IT

Apr 20 8:45pm InfoQ
Edward Hiley and Dan Rathbone talk about how NHS Digital has built a highly secure and resilient system for processing patient data, applying techniques more often used in the cloud to bare metal servers. They show how they’ve built automated performance tests, an immutable infrastructure and a scalable distributed compute cluster utilizing multiple data centers and bare metal servers. By Edward Hiley...
Read More

Custom Collectors in Java 8

Apr 20 4:01pm DZone Java Zone
Among the many features available in Java 8, streams seem to be one of the biggest game changers regarding the way to write Java code. Usage is quite straightforward: The stream is created from a collection (or from a static method of a utility class), it’s processed using one or many of the available stream methods, and the collected back into a collection or an object. One generally uses one of the static methods that the Collectors utility class offers: Collectors.toList() Collectors.toSet() Collectors.toMap() etc. Sometimes, however, there’s a need for more. The goal of this post is to describe how to achieve that.
Read More

JUnit 5 @AfterEach Annotation Example

Apr 20 3:30pm HowToDoInJava
JUnit 5 @AfterEach annotation is replacement of @After annotation in JUnit 4.The annotated method should be executed after each @Test method in test class. The post JUnit 5 @AfterEach Annotation Example appeared first on HowToDoInJava.
Read More

Managing the ''Not so Visible'' Dependencies in Your Java Code

Apr 20 12:01pm DZone Java Zone
In modern object-oriented languages, inheritance is massively used with its pros and cons. Moreover, languages such as Java offer simple inheritance but also allow classes to implement an arbitrary number of interfaces. With inheritance and interface implementation comes one additional ingredient that is naturally expected: method overriding. When a software evolves, you end up with hierarchies involving multiple classes and interfaces with methods definitions and implementations and then, the classes that are part of this hierarchy will be used by some other classes. In this context, it is difficult if not impossible to have control by hand over the usages or overriding classes of methods we would be interested in. Hereafter, I will present this problem in more detail with a very concrete and yet complex enough example, as well as some tools that can empower software architects and developers to gain more control over their code. Let’s start by introducing the following class diagram of a tax system which describes the situation mentioned above on a very small scale:...
Read More

Article: Q&A on The Rise and Fall of Software Recipes

Apr 20 10:33am InfoQ
Darius Blasband has written a book which challenges the conventional wisdom of software engineering, he protests against the adoption of recipes and standards-based approaches and rails against the status-quo. He calls himself a codeaholic who advocates for careful consideration of the specific context and the use of domain specific languages wherever possible By Shane Hastie...
Read More

Gradle Goodness: Change Local Build Cache Directory [Snippet]

Apr 20 9:01am DZone Java Zone
Gradle 3.5 introduced the build cache. With the build cache, we can reuse task output from builds that can come from different computers. We can also use the build cache feature for our local builds. By default the directory to store the cache is located in the Gradle user home directory on our computer (USER\_HOME/.gradle/caches/build-cache-1). We can change the directory for the local cache via settings.gradle of our Gradle project. For example, we could configure a directory in our project file structure to be the build cache directory. Then it is easy to clean the cache because it is a directory not shared by other Gradle projects. With the default directory location in the Gradle user home directory, the caches of all Gradle projects we run on our computer are stored in a single directory. And because the cache doesn't shrink and will only grow, we might want to have more control of where the cache of a single Gradle project is stored. This way, we can easily clean the cache because all files of a project are stored in the directory for that project. In the following settings.gradle file, we configure our build cache directory to be the directory build-cache in the root directory of our project where we store our settings.gradle file:...
Read More

Consumer lending platform Nava embarks on tech recruitment drive

Apr 20 8:53am Java News
Nava, a next generation consumer lending platform, is continuing its rapid expansion by launching a new office in Milton Keynes. The company, with headquarters in central London, hopes to capitalise on the town's burgeoning reputation as a leading technology centre in the UK.
Read More

Implications of the Presence of StringBuffer

Apr 20 6:01am DZone Java Zone
When I am working on legacy code and run across instances of StringBuffer, I typically replace them with instances of StringBuilder. Although a performance advantage can be gained from this change, I often change it in places I know will have little noticeable effect in terms of performance. I feel it's worth making the change for a variety of reasons in addition to the potential for performance benefit. There's rarely a reason to not choose StringBuilder over StringBuffer (API expectations are the most common exception) and the existence of StringBuffer in code misleads and provides a bad example to those new to Java. In the book The Pragmatic Programmer: From Journeyman to Master, Andy Hunt and David Thomas discuss "the importance of fixing the small problems in your code, the 'broken windows'." Jeff Atwood touched on this subject in the post The Broken Window Theory and it has been more recently addressed in the posts Software Rot, Entropy and the Broken Window Theory and Don't leave broken windows. The presence of StringBuffer implies a staleness in the code. In effect, use of StringBuffer may not be a "broken window," but it's a really old, leaky single-pane window that should be replaced with a modern, energy-efficient double-pane window.
Read More

NoSQL grudge match: MongoDB vs. Couchbase Server

Apr 20 6:00am JavaWorld
Choosing the right database for the job can be a daunting task, particularly if you’re entertaining the full space of SQL and NoSQL options. If you’re looking for a flexible, general-purpose option that allows for fluid schemas and complex nested data structures, a document database might be right for you. MongoDB and Couchbase Server are two popular choices. How should you choose?To read this article in full or to leave a comment, please click here(Insider Story)...
Read More

Lending Privilege for Increasing Diversity and Inclusion

Apr 20 5:33am InfoQ
A grassroots movement is necessary to increase diversity and inclusion in the tech industry. Everyone has privilege; lending it to marginalized groups can make it happen, argued Anjuan Simmons. If we have a diverse tech industry we will all win, as lending privilege increases value for everyone. By Ben Linders...
Read More

Arbitrary Precision Numbers

Apr 20 3:01am DZone Java Zone
I am working on a system that involves money handling, written in Java. And as you can imagine, one of the challenges is to make sure that money is not appearing or disappearing because of the floating point arithmetic. I asked a few developers how to handle money and one common answer was to use BigDecimal for that. Therefore, I performed a few experiments on the side and discovered few things that you probably won't see after the first look into this class. In this article, I am going to show these discoveries together with the final solution I decided to go with. Rounding Errors Before going into the detailed explanation, let's create an example that shows what happens with floating point numbers. Imagine you want to split $200 between four people. First, two of them will get 1/3 and the other two will get 1/6. Then let's see what happens when you put these parts back together. The following code demonstrates the situation (using Lenovo Yoga, Win 8.1, Java 1.8).
Read More

Access OSGi Services via web interface

Apr 20 1:58am vogella blog
In this blog post I want to share a simple approach to make OSGi services available via web interface. I will show a simple approach that includes the following: Embedding a Jetty  Webserver in an OSGi application Registering a Servlet … Continue reading →...
Read More

Why Should I Write Getters and Setters?

Apr 20 12:01am DZone Java Zone
When I started my career in Java, I was confused about getters and setters. One question always comes to mind: Why should I write getters/setters? It looked like some kind of weird syntax to me. I learned that through the public access modifier, one field of a class is accessible to any packages, and with getters/setters, I am actually doing the same thing — making the field private while the getter/setter method is public, so it can be accessed by any packages.
Read More

Mini book: The InfoQ eMag: Introduction to Machine Learning

Apr 19 5:26pm InfoQ
InfoQ has curated a series of articles for this introduction to machine learning eMagazine covering everything from the very basics of machine learning (what are typical classifiers and how do you measure their performance?), to production considerations (how do you deal with changing patterns in data after you’ve deployed your model?), to newer techniques in deep learning. By InfoQ...
Read More

Groovy Goodness: Redirecting Print Methods in Scripts

Apr 19 4:01pm DZone Java Zone
Running external Groovy scripts in our Java or Groovy application is easy to do. For example, we can use GroovyShell to evaluate Groovy code in our applications. If our script contains print methods like println, we can redirect the output of these methods. The Script class, which is a base class to run script code, has an implementation for the print, printf and println methods. The implementation of the method is to look for a property out, either as part of a Script subclass or in the binding added to a Script class. If the property out is available, then all calls to the print, printf, and println methods are delegated to the object assigned to the out property. When we use a PrintWriter instance, we have such an object, but we could also write our own class with an implementation for the print methods. Without an assignment to the out property, the fallback is to print on System.out. In the following example, we have an external script defined with the variable scriptText, but it could also be a file or other source with the contents of the script we want to run. We assign our own PrintWriter that encapsulates a StringWriter to capture all invocations to the printmethods:...
Read More

JUnit 5 @BeforeEach Annotation Example

Apr 19 3:30pm HowToDoInJava
JUnit 5 @BeforeEach annotation is replacement of @Before annotation in JUnit 4. Annotated method should be executed before each @Test method in test class. The post JUnit 5 @BeforeEach Annotation Example appeared first on HowToDoInJava.
Read More

Presentation: Building and Trusting a Cloud Bank

Apr 19 2:05pm InfoQ
Greg Hawkins discusses how Starling Bank, part of the new movement in FinTech challenger banks, is innovating while addressing the need for resilience in a world where failure is everywhere. He explains how they use techniques like failure injection and rapid, continuous delivery to build a cloud bank that customers can trust with their money and the regulator can trust with their guarantee. By Greg Hawkins...
Read More

This Week in Spring: Dalston, Microservices, and Reactive Endpoints

Apr 19 12:01pm DZone Java Zone
Hi, Spring fans! Welcome to another installment of This Week in Spring! This week, I’m in Atlanta, GA, at DevOps Days Atlanta, and Boston for the Agile Tech Alliance conference. If you’re around for either I’d love to see you — say hi! As usual, we’ve got a lot to cover so let’s get to it!...
Read More

39% off Exploring Raspberry Pi: Interfacing to the Real World with Embedded Linux, Paperback - Deal Alert

Apr 19 11:32am JavaWorld
The Raspberry Pi's most famous feature is its adaptability. It can be used for thousands of electronic applications, and using the Linux OS expands the functionality even more. This book, Exploring Raspberry Pi, is the innovators guide to bringing Raspberry Pi to life. The book favors engineering principles over a 'recipe' approach to give you the skills you need to design and build your own projects. You'll understand the fundamental principles in a way that transfers to any type of electronics, electronic modules, or external peripherals, using a learning by doing approach that caters to both beginners and experts. The book begins with basic Linux and programming skills, and helps you stock your inventory with common parts and supplies. Next, you'll learn how to make parts work together to achieve the goals of your project, no matter what type of components you use. The companion website provides a full repository that structures all of the code and scripts, along with links to video tutorials and supplementary content that takes you deeper into your project. The list price has been reduced 39\% on Amazon, from $35 to $21.40. See this deal now on Amazon. A complete Raspberry Pi starter kit can be purchased here for $89.99. To read this article in full or to leave a comment, please click here...
Read More

Facebook Litho: An Android UI Framework Created for Performance

Apr 19 10:49am InfoQ
Facebook has open sourced Litho, a framework for creating user interfaces in Android applications using a React-like declarative style with scrolling performance in mind. By Abel Avram...
Read More

Angular 2 Http post() Example

Apr 19 10:45am ConcretePage.com
On this page we will provide angular 2 Http post() example. It performs a request using HTTP POST method. In Http.post() method, we need to pass server URL, any object to post and request option that is optional. In request option we can set request headers such as content type and to handle this angular provides Headers and RequestOptions API.
Read More

How to Change Environment Variables in Java [Snippet]

Apr 19 9:01am DZone Java Zone
And the second dirty hack for the day: How to change system environment variables in Java — at least during the lifetime of a JVM. This can be useful when testing functionality that accesses environment variables set by container runtimes like Docker.
Read More

Stack Overflow: Like sleep? Don't code in C

Apr 19 9:00am News & Views
When it comes to developers' work habits and the languages they use, C# programmers tend to start and stop work earlier than C programmers, who stay up later. But for programming outside of the common 9-to-5 workday, Haskell gets the nod.In analysis of programming traffic on the Stack Overflow online community over for four weeks last August, Stack Overflow Insights data scientist David Robinson, found that traffic spikes during the workday—unsurprising since the site is used by programmers to help them do their jobs. You can even see a dip at 12 p.m. when developers eat lunch, he noted.For his report released today, Robinson focused on four languages: C, Python, JavaScript, and C#. While C# programmers start work earlier, they tend to use the language less in the evening. This might be because C# is often used at finance and enterprise software companies, which often start earlier and have rigid schedules, he postulated.To read this article in full or to leave a comment, please click here...
Read More

C# Futures: Read-Only References and Structs

Apr 19 7:40am InfoQ
In C++ we have a feature known as “const”. This can be applied to parameters so that the caller knows that function will not modify the parameter and/or the object the parameter references. Under this proposal, C# would get something similar. By Jonathan Allen...
Read More

Today 42% off Tom Clancys Ghost Recon Wildlands - (XBOX ONE, PS4) - Deal Alert

Apr 19 7:37am JavaWorld
Today you'll see the price drop an extra 42\% on Tom Clancy’s Ghost Recon Wildlands (PlayStatiExperience total freedom of choice in Tom Clancy's Ghost Recon Wildlands, the ultimate military shooter set in a massive open world setting.  The Santa Blanca drug cartel has transformed the beautiful South American country of Bolivia into a perilous narco-state, leading to lawlessness, fear, and rampant violence. With their corrosive influence growing, the cartel plagues the citizens of Bolivia but all hope is not lost. The Ghosts, an elite US Special Forces team, are tasked to combat the cartel and save the country from collapse.  See the discounted Ghost Recon Wildlands on Amazon.To read this article in full or to leave a comment, please click here...
Read More

Kotlin JEE (Part 1)

Apr 19 6:01am DZone Java Zone
One of the main strengths of Kotlin is good Java integration. As it is fairly easy to convert Java to Kotlin, it seems that making JEE applications in Kotlin should be a no-brainer. However, there are some subtle differences between the two that makes conversion tricky: While most frameworks require non-final classes, Kotlin classes are final. Injection will introduce a lot of unnecessary null checks. Both of these and mandatory parameterless constructors will ruin attempts to write functional-style code. JEE and Kotlin are not really best friends unless you make them. Luckily, all those issues can be avoided.
Read More

Mockito 2.x Over PowerMock Migration: Top 10 Tips and Tricks

Apr 19 3:01am DZone Java Zone
After so many years of hopeless waiting, Mockito 2.x has been released to solve many problems that developers have had with their tests. There are great features of Mockito 2.x, such as:...
Read More

8 Ways to use the features of your database with Hibernate

Apr 19 2:22am Thoughts on Java
A common misconception when working with Hibernate is that you can only map database tables and don’t use any other database features. That’s not the case, as I want to show you in this post. You can also use lots of other features which allow you to: Map read-only database views Call database functions Execute […] The post 8 Ways to use the features of your database with Hibernate appeared first on Thoughts on Java.
Read More

Spring Boot Hello World Example Mustache

Apr 19 1:10am Mkyong.com
A Spring Boot web application example, using embedded Tomcat + Mustache template engine, and package as an executable JAR file. Technologies used : Spring Boot 1.5.2.RELEASE Spring 4.3.7.RELEASE jmustache 1.13 Thymeleaf 2.1.5.RELEASE Tomcat Embed 8.5.11 Maven 3 Java 8 Note Spring Boot uses jmustache to integrate Mustache as template engine. 1. Project Directory 2. Project […]...
Read More

Java 9: Step by Step From Zero to Modules (Part 1)

Apr 19 12:01am DZone Java Zone
We all know why modules are super important. Modules are the building blocks of microservices! Modules the building blocks of a well-organized application. No matter whether you are writing in a dynamic language or a static language, modules are a super important part of your application! Modules enforce the single responsibility principle. You can call every function a module, as functional programming is based around modules. OK, you get me, modules are important, and this is why we are going to focus on them in this part of our tutorial. Our plan:...
Read More

Presentation: AI from an Investment Perspective

Apr 18 10:17pm InfoQ
The panelists discuss AI from an investment perspective, the challenges, the risks, trends, the role of Deep Learning, successful AI use cases, and others. By Sanjit Dang...
Read More

Presentation: Machine Learning at Scale

Apr 18 8:25pm InfoQ
Aditya Kalro discusses using large-scale data for Machine Learning (ML) research and some of the tools Facebook uses to manage the entire process of training, testing, and deploying ML models. By Aditya Kalro...
Read More

Article: Key Takeaway Points and Lessons Learned from QCon London 2017

Apr 18 7:15pm InfoQ
This year was the 11th for QCon London; it was also our largest London event to date. Including our 140 speakers we had 1435 team leads, architects, and project managers attending 112 technical sessions across 18 concurrent editorial tracks and 16 in-depth workshops. By Abel Avram...
Read More

How to Change Private Static Final Fields [Snippet]

Apr 18 4:01pm DZone Java Zone
Sometimes you need dirty hacks. This is one that can be useful in testing scenarios — how to change fields that are not meant to be changed. If we have class Knowledge with the answer for everything:...
Read More

JUnit 5 @BeforeAll Annotation Example

Apr 18 3:30pm HowToDoInJava
JUnit 5 @BeforeAll annotation is replacement of @BeforeClass and is used to signal that annotated method should be executed before all tests in test class. The post JUnit 5 @BeforeAll Annotation Example appeared first on HowToDoInJava.
Read More

Java SE 8 Update 131 and More

Apr 18 1:55pm Oracle Blogs | The Java Source
p.p1 {margin: 0.0px 0.0px 32.0px 0.0px; font: 20.0px Arial; color: #404040} li.li2 {margin: 0.0px 0.0px 31.2px 0.0px; font: 20.0px Arial; color: #1f4f82} li.li3 {margin: 0.0px 0.0px 31.2px 0.0px; font: 20.0px Arial; color: #252525} span.s1 {font-kerning: none; color: #1f4f82} span.s2 {font-kerning: none} span.s3 {color: #252525} span.s4 {font-kerning: none; color: #252525} ul.ul1 {list-style-type: none} Java SE 8u131 (Java SE 8 update 131) is now available. Oracle strongly recommends that most Java SE users upgrade to the latest Java 8 update, which includes important security fixes. For information on new features and bug fixes included in this release, please read the following release notes:   Java SE 8u131 release notes Important Note: Starting with this Critical Patch Update releases, all JRE versions will treat JARs signed with MD5 as unsigned. Learn more and view testing instructions here. For more information on cryptographic algorithm support, please check the JRE and JDK Crypto Roadmap. Oracle Java SE Embedded Version 8 Update 131 is also available. You can create customized JREs using the JRECreate tool. To get started, download an eJDK bundle suitable for your target platform and follow instructions to create a JRE that suits your application's needs. Also released are Java SE 7u141 and Java SE 6u151, which are both available as part of Oracle Java SE Support. For more information about those releases, please read the following release notes:  Java SE 7u141 Release Notes  Java SE 6u151 Release Notes...
Read More