Blog Archives
1 … 6 7 8 9 10 11 12 13 14 … 18

Basic Apache Camel and Spring tutorial

The Apache camel tutorial below creates a route to poll the c:/temp/simple folder every minute (i.e. 60000 milliseconds) for files with patterns like test1.csv, test2.csv, etc. These files are then zipped and copied to the archive folder under c:/temp/simple.

camel-with-spring

Step 1: Define the Apache camel and spring libraries required.

…

Read more ›



Basic Spring batch tutorial with Maven and Eclipse.

Batch jobs with Spring batch framework is very common and popular. This tutorial assumes that

1) You have set up you Java, Maven, and Eclipse

Once you have followed the following steps, you should have a project structure as shown below.

spring-batch-tut-1

Step 1: Create a new Maven project with the command shown below.

…

Read more ›



BeanIO Java tutorial

BeanIO is an open source Java framework for marshaling and marshaling Java beans from a flat file, stream, or simple String object. It is very powerful with support for XML, CSV, delimited and fixed length stream formats, Object binding, filed validation, integration with spring-batch, etc. Here is a basic tutorial to get started.

…

Read more ›



CDI annotations @Named and @Inject Dependency Injection in Spring 3.0 Tutorial

In Spring 3.0 the support for the CDI annotations @Named and @Inject are provided.

1) @Inject instead of Spring’s @Autowired to inject a bean.
2) @Named instead of Spring’s @Component to declare a bean.

Step 1: Create a simple Maven project.

…

Read more ›



Checkstyle & Maven Tutorial

Step 1: The pom.xml with the checkstyle plugin and properties.

Step 2: The checkstyle files that define the rules.

src/main/resources/checkstyle/myapp-checks.xml

src/main/resources/checkstyle/myapp-suppressions.xml

Step 3: Running via mvn command.

…

Read more ›



Converting POJOs to Pentaho meta objects and then passing to a Kettle transformation

This extends the tutorials on Pentaho DI 1) Part 1: Pentaho with user defined Java transformer tutorial. 2) Part 2: Invoking a Pentaho DI (i.e. Kettle) transformation from Java. 2) Part 3: Passing Pentaho DI (i.e. … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Creating a Maven profile to compile using a different JDK version tutorial

Profiles are very handy in maven to use different JDK versions, include different files for different environments, etc.

Step 1: Say you have a pom.xml file using Java 7 to compile.

Step 2: Say now you want to compile using Java 1.5.

…

Read more ›



Creating a simple Java Web project with Maven – part 1

Java beginners to create a simple web application (i.e. a Web ARchive file — i.e. a war file). Prerequisite is that you have set up Java, Maven, and Eclipse.

 Step 1: Execute the Maven maven-archetype-webapp command to create the Maven web structure with the following command on a DOS command prompt.

…

Read more ›



Creating a simple Java Web project with Maven – part 2 (Understanding war and pom.xml )

“Creating a simple Java Web project with Maven – part 1” covered developing a simple Java web application using Maven. This part is all about understanding the war and pom files. 1. The lib directory Q. … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Creating a simple Java Web project with Maven – part 3 (with eclipse & m2e plugin)

“Creating a simple Java Web project with Maven – part 1” covered developing a simple Java web application using Maven. “Creating a simple Java Web project with Maven – part 2 (Understanding war and pom.xml)” elaborated on war and pom.xml. … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Debugging like a pro with eclipse IDE tutorial for Java developers

Often you get to work on a fully functional Java application that is already in production to fix production issues or to enhance its existing functionality. As a new Java developer in the team, it is not easy to get started and contributing. The approach would be slightly different from working on a brand new project.

…

Read more ›



Debugging Maven issues and tips

Debugging Maven issues and tips. At times maven can cause issues relating to jar conflicts or not having the required jar file in the repository.

Q. In your experience, what are some of the challenges you faced with maven, and how do you over come them?

…

Read more ›



DOS script to execute a spring batch job

DOS scripts are very handy to automate tasks. This example illustrates a DOS script used to bootstrap a Spring batch job.

1) DOS variables are marked as %VARIABLE_NAME%

2) Remarks or comments are prefixed with REM

3) variables are assigned with “

…

Read more ›



1 … 6 7 8 9 10 11 12 13 14 … 18

300+ Java Interview Questions - FAQs

Tutorials on Java & Big Data