Languages
 
 
 
 
Follow Me



 
 

How to Get 5 Facebook Credits for Free


  Tagged

Follow next steps:

  • Install new Hello City game using this link
  • Follow the game tutorial steps
  • At the end of the tutorial you will collect 5 Facebook Credits.

Update 15.10.2010. Looks like this offer isn't actual anymore.


Unexpected database connection problem. Hibernate broken pipe.


  Tagged

While using Hibernate, several times I faced the same database communication problem: for some reason after long inactivity time connection was closed. Each time that happens it takes some my time to remember the solution. So this post is more like a note for myself, but also can be helpful for those who can find it in Internet.


Hibernate. Count queries without HQL


  Tagged

I like to use Criteria class for making database queries. Its easy to use and easy to understand, much better then HQL queries. For example:

	@SuppressWarnings("unchecked")
	public List<LogAdd> findAddLogs(Long minLogID) {
		Criteria criteria = session.createCriteria(LogAdd.class);
		criteria.add(Restrictions.gt("id", minLogID));
		criteria.addOrder(Order.asc("date"));
		return criteria.list();
	}

Previously I had to use HQL only for writing 'count' type queries. Because just trying to get collection size mean to load all elements into memory from database and only then count them. Of course such kind of code isn't acceptable.


13949712720901ForOSX


  Tagged

My vote for java 6 on Mac OS... 13949712720901ForOSX


Installing Apache Tomcat 5.5 on Debian 4 (Etch) Linux


  Tagged

If you need to install and start Apache Tomcat quickly, probably this article can help you.

1) Sun JDK 5 need to be installed. It can be installed from Debian repository with unstable software

Add to /etc/apt/sources.list following lines (if not present yet):

# for sun-java packages in unstable
deb http://ftp.debian.org/debian/ unstable non-free
deb-src http://ftp.debian.org/debian/ unstable non-free


Java Application Process Name in Mac OS X


  Tagged

I have found that several of my Java applications have same process name on Mac OS X. JavaApplicationStub utility is usually used for launching java applications on mac os and as the result there are several processes named 'JavaApplicationStub' in Activity Monitor shown.


I have created simple HelloWorld application to reproduce this problem. And I was really surprised when saw that it's process name was correct!






New project with maven2. Part 2 (wizard)


  Tagged

As was discussed in one previous post I have changed the script which became a wizard. This improvement makes the application generation process easier for the user. It also provided additionally functionality.

After answering on several questions and specifying a required type of application a project will be generated. Just run Eclipse IDE and import it into your workspace.


Java application menu in system tray


  Tagged

 I got the task to implement system tray menu for java desktop application. After some research I found several ways to finish my task:

  • java 6
  • java desktop components integraion library (jdic)
  • eclipse swt

 I have only the one biggest requirement for new application. It should support all most popular operating systems (win, linux and mac os). Java 6 has no support on mac os x. For some reason I was thinking that Jdic has no support on Mac OS X too (now I know that I was wrong). Starting from 3.3 version, SWT started supporting all main operation systems. And as the result SWT became my one and only choice.


You may make up a free wallpaper, but still it will be hard to get it


  Tagged

Have you ever try’s to look for free wallpapers? Looks like quite easy. Just google for ‘free wallpapers’ and get a lot of results. But, when I try’s to do this for myself I found several problems. So I decided to review 30-40 sites and select the best ones.

First of all, what the most common problems I have found? Look next:


New project with maven (small help note)


  Tagged

Once in a while I need to make small java applications maybe for testing some library, maybe as helper applications. As for me the fastest way to do this, is use maven archetype mechanism. But new project creation command not very user friendly since it required several parameters that you need to remember (‘-DarchetypeGroupId’ or ‘-DgroupId’). As solution you can make small help script and put it into your projects folder.

As quick solution I make small shell script (new_project.sh) that can be used for fast start:


 
© 2006-2010 kobyleha.com