Some simple debugging tools related to Java. These are for those who are new to Java.
1.
Application is crashing : Most miserable one. Get your log file, try to
analysis log. How to write log file, use Java Logger API. Java Logger
had been introduced in JDK 1.4.2. The most awesome feature of Logger
API is that you can use it in production without much overhead. The
overhead is controlled by something called level in API. Level goes
from FINEST to SEVERE. You can refer to O'Relly Book "Java, In a NutShell". I guess. ...........
Today I was looking some options in jdk/bin and suddenly I came across
a file name xjc.exe in JDK6. Quickly I checked the existence of this file in JDK 5.0 and JDK
1.4.2. File was not present. Goggling didn't provided too much of help
and I tried with myself :)
/** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; }
/** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; }
/** * Gets the value of the pop property. * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getPop() { return pop; }
/** * Sets the value of the pop property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setPop(BigDecimal value) { this.pop = value; }
}
and
objectFactory don't have too much in it. Just creating a Country class
instance. Oh so it is something cool, its making all the getter and
setter method for me, what else I need :).
Remember, such type
of methods are too much in demand when you are writing any jsp page.
So, if you are clear with the data type, just make an xsd file and xjc
will convert in into java code.
I still doubt what xjc refers for ... may be xml to java converter :)
Hi, I am Vaibhav. I am working in Java and JavaFX group. This blog is about writing simple code and application in Java and newly launched JavaFX. I am working in Bangalore, India.