Java SE Development Kit 6 Update 19 is available

You can download it from this link.
Details you can find on Release . . . → Read More: Java SE Development Kit 6 Update 19 is available

  • Share/Bookmark

Using system properties in Java

The System class maintains a Properties object that describes the configuration of the current working environment. System properties include information about the current user, the current version of the Java runtime, and the character used to separate components of a file path name.
In this post I am going to show simple example which shows how to . . . → Read More: Using system properties in Java

  • Share/Bookmark

Getting system environment variables in Java

I am going to demonstrate example which shows how to get environment variables from Java code

import java.io.IOException;
import java.util.Map;

/**
* This class shows how to get all environment variables and how to get specific environment variable
* @author The Developer’s Info
*/
public class Main {

public static void main(String[] args) throws IOException {
. . . → Read More: Getting system environment variables in Java

  • Share/Bookmark

Using Properties in Java

Java has great API for working with properties.
In this post I am going to show example which shows how to work with properties with Properties class.
In my work I very often use properties and xml files for configuration.
Example will show how to load properties from property file, how to read them, how to write to other property file and how to set the new properties. Continue reading Using Properties in Java

  • Share/Bookmark

Setting character sets for database in MySQL

MySQL can store data using various character sets. To view the supported character sets in your server run

mysql> show character set;

MySQL allows to set which character set need to use for database

create database some_db character set cp1250;

and for column

varchar(20) character . . . → Read More: Setting character sets for database in MySQL

  • Share/Bookmark

Avoiding problems with Date format in MySQL

If you construct a string with which to populate a date column and that string does not match the expected format, you will receive error.
In this case MySQL has function str_to_date which specifies string format

mysql> update … set birth_data = str_to_date(‘FEB-12-1990′, ‘%b-%d-%Y’) where …

Formatters:

%a – the short weekday name: Sun, Mon,…
%b – the short month name: . . . → Read More: Avoiding problems with Date format in MySQL

  • Share/Bookmark

Getting query result in XML in MySQL

MySQL allows to generate XML output from query.
It is very useful when you are working with XML data

mysql -u user_name -p –xml database_name

After that you can select data and result will be as an . . . → Read More: Getting query result in XML in MySQL

  • Share/Bookmark

Creating and using databases in MySQL

In this post I am going to show simple examples which should help to understand how to create database, table, how to populate, update data in table and how to delete data from table and how to delete database.
I will use MySQL database server which you can download from mysql.com. Continue reading Creating and using databases in MySQL

  • Share/Bookmark

Getting current time in MySQL

Simple command which shows current time in MySQL server:

mysql> . . . → Read More: Getting current time in MySQL

  • Share/Bookmark

MOTODEV Studio for Android 1.2 is now available

An new version of MOTODEV Studio for Android is available. This release provides support for the Android 2.1 (Eclair) SDK and includes version 0.9.6 of the Google ADT plugins.
Several new features for this release:

the ability to install into your own Eclipse environment
64-bit host support
Windows 7 . . . → Read More: MOTODEV Studio for Android 1.2 is now available

  • Share/Bookmark