Posts

Showing posts from June, 2009

Setting User Name in Eclipse For Comments Generation

Recently I have noticed that eclipse IDE on Fedora inserts the default system user name "root" in the @author attribute for java comments. I have found two ways to change the Default System User name to what ever you like, The First way is to The other one is just by  changing the associated templates in Window -> Preferences -> Java -> Editor -> Templates -> @author , and hard coding the author's name. The Other way is by editing the eclipse.ini file, For example , the following eclipse.ini file shows what I have done to set my name -showsplash org.eclipse.platform -framework plugins/org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx512m -XX:MaxPermSize=256m -Duser.name="Siddhartha(Sidd)" Notice the  attribute Duser.name , that I have set to Siddhartha(Sidd),  after changing eclipse.ini we should restart eclipse so that changes can take effect. Now, when ever I want to a

Hibernate 3 with Annotation Hands on with Example

I have worked with Hibernate2 where we had to define all configuration as well as Class to Table mapping though XML files. Hibernate 3 goes one step ahead and provides new ways to work Where we can use annotation to define Class-Table mapping. Hibernate3 supports annotation and requires Java 5 or above to function properly. While trying to work with Hibernate you will notice it has several dependencies to other third party jars, like apache commons collections , apache commons logging. I have tried to put all the required file in a zip file  and named it   "hibernate3AllJars" . Since while playing around with codes which require some data base I prefer MySQL   since it is very easy to use and it is free. I have also putted the  MySQL JDBC Driver  mysql-connector-java-5.0.5-bin in the zip file. If needed you can email me regarding the zip file. For the Hands on I have created a Table in MySQL Database "sidd"  by executing the following command, CREATE TABLE `hone