Categories
Android

How to add a file .jar to an Android project in Eclipse

Adding a file .jar from the menu of Eclipse, File -> Properties -> Java Build Path -> Libraries -> Add External JARs…, causes an error, the project compiles but at runtime you get the error “NoClassDefFoundError” as if the file .jar was missing in the project.

Categories
Java

The access modifiers of methods and variables of a java class

In this article I explain how to set the visibility of methods and instance variables, ie those variables declared outside of any method (the variables declared within a method are called local variables and they are visible in the method only).

Categories
Java

The modifiers of a Java class

The modifiers of a Java class are:

  • public
  • abstract
  • final
  • strictfp
Categories
Android

Dynamic TableLayout in Android

In this post I explain how to implement in runtime a table with rows and columns without using a XML file.
To display the borders of the TextView I use the method illustrated here.

Categories
Java

Setting MyBatis in Spring

MyBatis, a free software distributed under the Apache License 2.0, helps to connect Spring with relational databases using XML or annotations.
Here’s a simple example loading a jsp page to display data from a mysql table.

Categories
Android

Placing the components of a LinearLayout

The purpose of layout is to arrange the various components within itself according to a particular scheme and the LinearLayout is the simplest of layout which is proposed by default when you create an Android project.

Categories
Java

How to set Sun’s java platform as the default java platform in Netbeans

I realized that in Netbeans the default Java platform for the projects was not the Sun’s and it was not possible to change this setting by using some features of NetBeans, but I had to manually edit a configuration file.

Categories
Java

Basic configuration of Log4j in Spring using a .xml file

There are 2 ways to configure Log4j in Spring using:

  • a .properties file
  • a .xml file

The configuration with the. xml file allows to take advantage of some aspects that can not be configured with the .properties file that is therefore regarded as obsolete.
This article will explain how to configure Log4j using the .xml file and the configuration with .properties file was treated in a previous article.

Categories
Java

Basic configuration of Log4j in Spring using a .properties file

There are 2 ways to configure Log4j in Spring using:

  • a .properties file
  • a .xml file

The configuration with the. xml file allows to take advantage of some aspects that can not be configured with the .properties file that is therefore regarded as obsolete.
This article will explain how to configure Log4j using the .properties file and the configuration with .xml file will be treated in a subsequent article.

Categories
Java

Hello World with Spring 3.0

This post explains how to implement a simple web application with Spring 3.0 on Tomcat.