Tag Archives: Java

Fixing “Class has two properties of the same name” exception

I started to learn JAXB from Vogella tutorial site. I changed the package and project name, and running the example generated following exception. Solution: After some googling I figured out, that I have to move annotation to the getter method. That solves above exception. The Bookstore.java will be look like this:

Read more
How to set JAVA_HOME environment variable for root user on AIX?

How to set JAVA_HOME environment variable for root user on AIX?

If you are following my previous post about installing Java 6 64bit on AIX 6.1 platform, next you have to set JAVA_HOME and PATH variables. If you want to set environment variables for non root users. You can set those variables in /home/<user>/.profile file. For a root user, setting an environment variable is different. As you will not find […]

Read more
How to install Java 6 (Java6_64.sdk) on AIX 6.1?

How to install Java 6 (Java6_64.sdk) on AIX 6.1?

This tutorial is about installation of Java6 64bit on AIX 6.1 platform. 1. Obtain the installer archive for Java6 64bit (Java6_64.sdk.6.0.0.385.tar). 2. Extract the tar file in the same directory tar –xvf Java6_64.sdk.6.0.0.385.tar You will have Java6_64.sdk. .sdk file is backup/restore format file 3. Enter following commands to start installation of this format inutoc . […]

Read more
FUD: JDBC addiction and designing software for NoSQL

FUD: JDBC addiction and designing software for NoSQL

I am having a background of programming Java based web systems with RDBMS. Where I write a lot of JDBC code. Updates, select statements with a lot of joins, inserts etc is a part of my daily job. Most of my time consumed on maintaining the state of database, validating from base tables and after all storing […]

Read more
How to find mime type of a file in Java

How to find mime type of a file in Java

Validating a file when it is getting uploaded in the system is some time very necessary. We can check the extension of the file, but what if user has changed the extension to crack the system. So the best way is to find the mime type. There are multiple libraries that you can use to […]

Read more
Calling Posterous API in Java

Calling Posterous API in Java

I was playing with Posterous API to call it in Java program. If you guys want to call Posterous API, you need to get API Token from Posterous API Docs first. This API Token (api_token) will go with every URL that you will invoke in your code. I was missing this token and was wondering […]

Read more
From 1st September 10, Sun Certification titles will be changed to Oracle Certification

From 1st September 10, Sun Certification titles will be changed to Oracle Certification

Just came to know from Oracle website that they have completely integrated Sun certifications with Oracle certification program. The title of certification has been changed. Now Sun Certified Java Programmer will be know as Oracle Certified Professional, Java Programmer. From Oracle website: Effective September 1, 2010, all Java, Oracle Solaris, MySQL, Open Office and Oracle […]

Read more
Struts 2 Spring integration: a kickstart on using dependency injection

Struts 2 Spring integration: a kickstart on using dependency injection

In this post you will find how we can integrate Spring with Struts2 through struts2-spring-plugin. And we will also see how we can use dependency injection. I assume that you are successfully running a Struts2 application. We will add our Spring integration code in that. Lets take a scenario. You have an Interface DAO.java that […]

Read more
Div based UIs. Heaven or Hell for a developer?

Div based UIs. Heaven or Hell for a developer?

At my work I have a large application that has all web pages in table based layout. The use of Div is just limited to hide and show some content area on web page. Same is the case with CSS. Using them for styling fonts and some formatting for tables. Like every developer (not designer) […]

Read more
New topics added in SCJP 6 Certification (CX-310-065)

New topics added in SCJP 6 Certification (CX-310-065)

Following are the points that are highlighted in Kathi Sierra and Bert Bates book on SCJP6. 1-    Console class. 2-    NavigableSet and NavigableMap. 3-    Lower(int) and higher(int) function are added in Treeset collection. 4-    Polling method in TreeSet and TreeMap. 5-    TreeSet.descendingSet() and TreeMap.descendingMap(). Thanks to Bilal for discussing these points with me.

Read more