JAXB Custom Binding for Joda-Time
I’m extensively using Joda-Time for handling time in my Java development, client or server side. Joda-Time is the codebase of the coming RI implementation of JSR-310 that will hopefully ship in Java 7.
I often need to work with dates in web services implementations, here is the JAXB custom binding lines I use to un/marshall JodaTime types to standard xs:date and xs:dateTime XML Schema types.
Note : I’m using the RI implementation of JAXB spec bundled in Metro.
(more…)
Classpath tools : jcfind and JWhich
Deep understanding of Java classpath is something that is too often neglected. I won’t write an article about classpath, internet is full of readings about it :
- How Classes are Found at java.sun.com
- Classpath (Java) page from Wikipedia
- Classpath entry in the Java Glossary
- Java Tip 105: Mastering the classpath with JWhich
Here come JWhich and jcfind. Both are classpath reflection tools.
JWhich provides a command line interface and a Java api where jcfind only has command line interface and is written in python.
I prefer to use jcfind from the command line because it’s really faster than Which4j and the command line is more practical. In Java software, I use the JWhich API that is really easy to use. The big drawback of using Which4j from command line is that you must provide a full class name, using it’s API you can search for a class simple name.