Monday, February 16, 2009

Other Pointers

  • Weblogic Erroneous Handlers Error - this is caused by the jrockit version of jdk. To get the correct error message, use the Java jdk first. Source: http://ricksolutions.blogspot.hk/2009/03/fixing-erroneous-handlers-error.html
  • checking tables on db2
  • select * from sysibm.systables where dbname='NACS01DB' and name like 'PC%'
  • command for unzipping war files
  • jar xvf xxx.war
  • Extracting the Contents a JAR File
    The basic command to use for extracting the contents of a JAR file is:
    jar xf jar-file [archived-file(s)] 
    Let's look at the options and arguments in this command:
    • The x option indicates that you want to extract files from the JAR archive.
    • The f options indicates that the JAR file from which files are to be extracted is specified on the command line, rather than through stdin.
    • The jar-file argument is the filename (or path and filename) of the JAR file from which to extract files.
    • archived-file(s) is an optional argument consisting of a space-delimited list of the files to be extracted from the archive. If this argument is not present, the Jar tool will extract all the files in the archive.
  • character encoding - http://www.joelonsoftware.com/articles/Unicode.html
  • DB2 Timestamp to java.util.Date or java.sql.Timestamp
    The ZZZZZZ part of DB2 timestamp is insignificant because it is just the total seconds since previos midnight.
    To convert to java.util.Date, use
    new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(dateStr)
    To convert to java.sql.Timestamp, use
    resultSet.getTimestamp([column name or column index])

Ref:
http://technobuz.com/2011/04/run-commands-for-microsoft-applications/

No comments:

Post a Comment