Home » Java (page 570)

Java

Java static methods can be a code smell

Definition of code smell (from Wikipedia): “any symptom in the source code of a program that possibly indicates a deeper problem.” In Java, static methods allow you to execute code at a “class scope” as opposed to an instance scope like member methods. This means, they rely on class-level variables (if any), parameters passed to the static method, or any ...

Read More »

Google App Engine JAX-RS REST service

In this article you will learn how to create a REST service using JAX-RS reference implementation (Jersey) and deploy it on Google AppEngine. Prerequisites  For this tutorial you will need: a Google AppEngine account Eclipse Galileo (3.5.x) Google App Engine SDK for Java Install the Google Plugin for Eclipse as documented here (Check that you are using the release 1.3.1 ...

Read More »

JavaME: Google Static Maps API

Whether you need a map for your location based application or just for fun, you can use the easiest way ever: Google Static Maps API. In this post, we are going to see how you can get a Map as an Image from a latitude and longitude point. The latitude and longitude can be obtained using Location API which we ...

Read More »

Apache Shiro Part 1 – Basics

Apache Shiro, originally called JSecurity, is Java security framework. It was accepted and became Apache top level project in 2010. It aims to be powerful and easy to be used. The project is in active development with active both users and developers mailing lists. Most important areas are documented on its web page. However, it has lot of gaps in ...

Read More »

Backing Spring Integration routes with ActiveMQ

spring-interview-questions-answers

As discussed in my previous post, Spring Integration (SI) is a routing framework built on top of the Spring Framework that allows you to use proven enterprise integration patterns to solve system integration problems via messaging. Once you’ve gotten SI configured and working to perform your routing and mediation logic, you may find that you’d like to take the next ...

Read More »

Run Vaadin Apps in Intellij IDEA

In this article I’m going to show you how to run vaadin applications with Intellij IDEA. Vaadin provide some plugins for Eclipse and Netbeans. But for Intellij IDEA there are no plugins yet. But to deploy vaadin app is easier than other two IDEs. Here are the steps that you want to follow. 1. First Create a New Project , ...

Read More »

GC overhead limit exceeded – Java Heap analysis

This post is the continuation of our original GC overhead limit exceeded problem patterns post. Proper Java Heap analysis is critical in order to eliminate your OutOfMemoryError: GC overhead problem. If you are not familiar with this Java HotSpot 1.6 error, I recommend that you first review my First Article on this subject. This article will provide you with a ...

Read More »

Secure Password Storage – Don’ts, dos and a Java example

The importance of storing passwords securely As software developers, one of our most important responsibilities is the protection of our users’ personal information. Without technical knowledge of our applications, users have no choice but to trust that we’re fulfilling this responsibility. Sadly, when it comes to passwords, the software development community has a spotty track record. While it’s impossible to ...

Read More »