Java

This category contains all the posts under core java and ways to program in Java

Forcing Vaadin Component to occupy it’s space in invisible state

The article "Forcing Vaadin Component to occupy it's space in invisible state" is in regard of a programming problem which I faced while writing a Vaadin application. Below is the problem description: I have a ProgressIndicator, a Label and a Tree added to a CSSLayout. Initially the ProgressIndicator and the message Label visibility is set to false. If a component in the tree is clicked the action listener changes the ProgressIndicator and the Label visibility to true. Consequently the whole tree shifted down by the height of the components whose property got changed to visible. I wan...
Read More

Extracting ResultSetMetaData from Spring JdbcTemplate

This is in response to a programming problem where extracting ResultSetMetaData from Spring JdbcTemplate was the requirement. Spring provides a wrapper over ResultSet and gives us the options to map the returned RestultSet with an object of our choice. This is easily achieved by using RowMapper interface. Below is a sample code for the usage of RowMapper: [crayon-594bb297cdd42609924142/] This can be easily done using RowMapper if the returned ResultSet is not empty. The problem arrives when the ResultSet is empty. The ResultSet is closed and it can't be used to fetch the ResultSetMetaDat...
Read More

Java-Spring Web Application – Maven

Here we learn to create a simple web application in Java and Spring using Maven build and dependency management tool. There are several articles written with various alternatives. Java-Spring Web Application - Maven, is the simplest article and it helps in creating the simplest web application. It just demonstrates integrating Spring MVC using maven. It also demonstrates the capabilities of maven, how we can get rid of the traditional approach of including each jar in the class path by manually searching and downloading it. First for the impatient programmers: Complete the following prere...
Read More

Setting Up Java Development Environment on Windows

Here we learn how to setup java development environment on Windows System. Setting up java development environment on any system would require the basic steps mentioned below. The procedures might be different to complete the below steps. Download Java Development Kit Download Java Development Kit from here. Please make sure you are download the correct version of java i.e. 32 bit /64 bit depending on your operating system. You can find the operating system version by typing Control Panel\System and Security\System in windows address bar. Install java Development Kit and Java Runtime Enviro...
Read More

System Variables and System class path in Windows

This article describes in detail the role of system variables and class path in windows environment. It also explains us how to set System Variables and System class path in Windows. System variables are good, although we can work without them, but having them makes our life easy. It is a choice and not a compulsion. System variables in windows are like names given to a location. Like if I want to refer the location C:\Program Files\Windows Media Player by the name player. It can be done by setting a system variable named player with the value C:\Program Files\Windows Media Player. Pl...
Read More

Setting Up Maven on Windows System

Here we learn Setting Up Maven on Windows System. Maven is a build life cycle management tool. The real power of maven is in its plugin architecture. Plugins are available in maven for almost everything you want to do. This tutorial is just to setup Maven on windows system. Prerequisite : java must be installed on the system and JAVA_HOME environment variable and system class path must be set for java. Read more about how to setup Java. Step1: Download the latest version of maven from here. At the time of writing this tutorial the version available was 3.0.5. Step2: You can downloa...
Read More