[Java] printStackTrace() over a String
Another little and easy tip I often use. The task is to redirect the Throwable.printStackTrace() over a String object. In this way you can manage the string including it, for example, in an XML stream....
View Article[Java] Formatting a number with right dots and commas
Formatting a number in the proper way is very important for the final user. And if you are in Locale different from the US one, then you can encounter some users that complain against it. For example...
View ArticleIncrease java heap size
It could happen sometimes (more often when working with images) that a java program hang up with a java.lang.OutOfMemoryError. This generally happen because there’s not enough space in the heap memory...
View ArticleHibernate and Websphere
Here is an hibernate configuration file that works under WSAD/Websphere with an Oracle9i. Just remember to fix datasource and default_schema.
View Articleexecute shell command via java
It happened to me that working via an extranet on a citrix environment in a WSAD workspace, that I needed to remove the attribute to at least 200 files in different directories. Since do it one by one...
View Articlerounding double in java
Credits: Gabri Le Cabri (from flickr) Rounding a double in java is very simple. If you have to round it to the nearest integer you could use the Math.round(double) method, but what about if you have to...
View ArticleSSL and java
credits: ph0t0 (from flickr) Sooner or later it happens that you have to access an https via Java. Accessing a generic http (non ssl) site is quite easy using the URL and URLConnection objects. When...
View ArticleSSL and Java (ciak 2)
credits: Vagamundos (from flickr) Last time we spoke about accessing a site via HTTPS using the pure Sun way. Today, we see the same problem, solved with the apache HttpClient libraries. This library...
View ArticleOracle Certified Programmer for the Java 2 Platform
by JAWspeak via flickr Yes! Now I’m an Oracle (Sun) Certified Programmer for the Java 2 Platform, SE 6.0. Just to let you all know
View ArticleFindings of eclipse with testng
First of all I’ve always used JUnit and not TestNG. This post is not blaming on anything. It’s just pointing out the little stuff I had to do to make my eclipse works with TestNG. Install TestNG from...
View Article
More Pages to Explore .....