.zugiart
Software Engineering, buddhism, and everything else in between.
  • Blog
    • Thoughts
    • Tech
  • About
  • Notes
    • Business Analysis
    • Chinese tea
    • Nokia n900
    • Programming
      • Linux Ubuntu Desktop Guide (9.10)
      • Linux Ubuntu Server setup
      • Python Programming
    • Sun Tzu – Art Of War
      • Chapter 1 – Laying Plans
      • Chapter 2 – Waging War
    • Tao Te Ching
      • Chapter 1-6
    • TED.com
      • TEDxMelbourne 2
      • TEDxMelbourne3
Browse: Home / java

java

Simple GNU command line parser in Java via Apache commons CLI

By zen on November 29, 2010

I like Apache Commons CLI and I really like the GNU style command line argument / option parsing. The one thing with the commons CLI is that it covers a lot of use cases, but I find it a bit cumbersome to set up again and again for some of my CLI programs, so I [...]

Posted in geeky | Tagged apache, cli, commons, java | Leave a response

Java: Date, ISO string, and timezone

By zen on September 14, 2010

This is a convenience class around SimpleDateFormat to parse/format date from/to ISO string: yyyy-MM-dd’T’HH:mm:ssZ. The printing bit allows for timezone to be specified, which just wraps around DateFormat’s .setTimezone() method. Note that Date object in java is not timezone-specific. The Timezone conversion is required only during formatting. Usage String date = "2009-09-10T10:00:00+0000"; Date d = [...]

Posted in geeky | Tagged date, java | 4 Responses

Handling Oracle cursors in JDBC

By zen on August 17, 2010

Summary It is common practice for Oracle stored procedure to pass cursors to calling client. The client then needs to guarantee that the cursors are handled and closed properly, otherwise overtime the open cursor will accumulate into an ORA-1000 error (“ORA-1000 Maximum Number of Cursors Exceeded”) In Java world, cursor translates as ResultSet. In the [...]

Posted in geeky | Tagged cursor, java, jdbc, oracle | Leave a response

Debugging a remote java application with Eclipse

By zen on July 2, 2010

You can remotely debug a java application by first starting it like below. java -Xdebug -Xrunjdwp:transport=dt_socket,address=8888,server=y …. Then, any decent IDE (such as Eclipse) with facility to remote debug a java application will be able to attach into the running process under the specified port (in this case, 8888). in Eclipse: Run > debug configurations [...]

Posted in notes | Tagged debug, eclipse, java, remote | Leave a response

apache/bash/buddhism/classical/compassion/death/deviantart/distributed systems/eclipse/enlightenment/firefox/global crisis/hosting/japan/java/job/life/linux/literature/music/n900/notes/oracle/philiosophy./photography/poetry/programming/proxy/python/refactor/religion/roundup/rpc/science/software engineering/ted.com/tedxmelbourne/twitter/unsustainability/wallpaper/wisdom/wordpress/work/xml/xml-rpc

{ last word

  • jump chess is an interesting game. it teaches one about the importance of having an open mind. There are no fixed strategy in jump chess.3 days ago
  • it's that time of the day again. #eveningdelight gotta love jump chess! http://t.co/VkBjYnR93 days ago
  • #eveningdelight a game of jump chess, green tea ice cream and cakes http://t.co/mAhsLmeG4 days ago

{ search

Copyright © 2012 Zenikko Sugiarto. Powered by Wordpress