Shutdown hook problem

Hi!

I have a problem with shutdown hook!

If i start my app from cmd(java -jar myjar.jar) the shutdown hook works fine but if i start my app by double clicking the jar file the shutdown hook don't work!

What could be the problem!

I don't like the first way because i get the cmd and i can't hide it!

Thanks in advance!

[357 byte] By [kynamara] at [2007-11-27 0:33:55]
# 1
Shutdown Hook is activated while call to System.exit(...)!
vitallisa at 2007-7-11 22:41:11 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
and how does this happen at system shutdown or user loggoff?Give me an example please!!!
kynamara at 2007-7-11 22:41:12 > top of Java-index,Java HotSpot Virtual Machine,Specifications...