Archive for May, 2009

pgsql differs from mysql

Wednesday, May 27th, 2009

i have decided to build the a sample application using jmatter on top of postgres database i just changed the nepali/english calendar thing into postgress so much of changes almost took a day.  postgres have more defined type of data type then mysql, like in mysql you could be doing concat(1,2) but in pg you cannot concat  integers with concat rather the concat operator is || and you need to do select 1::varchar||2::varchar . guess it :: is the type conversion operator.

and when we do select a b from table1 then it is wrong the field a is not aliased into b we need to select a as b from table1.

i will up2date as i go on

Jar files created by code that does not run

Monday, May 25th, 2009

I created a jar files by coding in java and using the classes
java.util.jar.JarEntry;
java.util.jar.JarFile;
java.util.jar.JarOutputStream;
java.util.zip.CRC32;

I created the jar file but the jar file is not runnable using java.exe but it could be opened by using programs such as 7zip or winrar the mistake i did was adding the zip entry with \ .

it took me hours to figure out but if we need to jar files that contains folder structure in it and it must run using java.exe or will be in classpath then \ must be replaced with / in windows platform