Hi Bill,
Thanks for your reply,
Currently i'm using by this way by inilizing my scripts in "myCommand" java code itself.
But its not safe and hackers easly hack code. so i'm looking for safe method.
its good practice to seperate all possible cases in seperate catch block(try to cover all types of exception don't use Exception class). and instead of using printStatckTrace()
use Logger class to print your exception in console.
and don't forget to use finally for query to close your connection, resultset, statement objects.
hi all,
i want to write a linux script and execute that script in a java code. which is bestpractice to do it.
and my puropse for doing is i need to write on a file then i need to compare to another file and take the difference.
Tim Moores,
Actually i am trying to convert date and time to UTC. My client local timezone is US/Pacific. this code works fine for all the cases if i give 03/20/2012 10:00 it converts correctly and returned 03/20/2012 03:00 but for this DST when i give input for 03/13/2011 08:00 it should return 03/12/2011 01:00 but this code returning 03/12/2011 00:00
when i give 03/13/2011 08:00........ it should return 03/12/2011 01:00 that is input date -7hrs is correct for UTC conversion but for DST times it converts -8 instead -7.