Tag Archives: Java

Capturing a process output in Java

Capturing a process’ output in Java is a relatively simple task as shown in the following sample code. import java.io.BufferedReader; import java.io.InputStreamReader; public class Capture { private final static String COMMAND=”ifconfig lo0″; public static void main(String[] args) throws Exception { … Continue reading

Posted in Java | Tagged | 1 Comment

Exception-Handling Antipatterns

I’ve just read an article on exception handling antipatterns by Tim McCune over on java.net. In thie article, Tim describes the different types of exceptions Java has and when each different type should be used. He then goes on to detail 12 … Continue reading

Posted in Java | Tagged | Leave a comment

Setting J2SE 5.0 as the default on Apple Mac

The new Apple MacBook Pro’s come with both J2SE 1.4 and J2SE 5.0. J2SE 1.4 is set as the default. If you want to make J2SE 5.0 the default JVM, open up a terminal and type the following: cd /System/Library/Frameworks/JavaVM.framework/Versions … Continue reading

Posted in Java | Tagged , | Leave a comment

Sun Java Studio Enterprise

Thanks to this post on The Pragmatic Architect I’ve downloaded Sun’s Java Studio Enterprise with the intention of using it for UML modelling. I’ve only played with it so far, but it looks like a comprehensive UML modelling package. I’ll post some more notes … Continue reading

Posted in Java | Tagged , | Leave a comment

Log4j vs Java 1.4 Logging – Is there a difference?

In the past, whenever I’ve done logging within a project, I’ve used log4j as my preferred logging package. This has been primarily for historical reasons as I started developing with Java before the JDK 1.4 logging package was available. Earlier this week, … Continue reading

Posted in Java | Tagged | Leave a comment

Useful tip for Java/C# developers

Tip of The Day on devx.com shows how comparing strings is different in C# and Java. One to remember for developers using both languages.

Posted in C#, Java | Tagged , | Leave a comment

Commons Email 1.0 Released

Commons Email version 1.0 has been released today. “Commons-Email aims to provide a API for sending email. It is built on top of the Java Mail API, which it aims to simplify.”

Posted in Java | Tagged , | Leave a comment

Java Antipatterns

As patterns generally described good software practices, antipatterns do the opposite – they describe bad software practices. Theres a good article on devx.com that gives an introduction to antipatterns.

Posted in Java | Tagged | Leave a comment

Java Web Start

I’ve just noticed a poll that is currently running on the java.net home page asking if anyone has ever ran a Java Web Start Application. I must say that the results were quite encouraging. At the time of writing, 80% of the … Continue reading

Posted in Java | Tagged | Leave a comment

Do you follow the Project Conventions for Enterprise Applications?

I was reading the Project Conventions for Enterprise Applications today which is published on the Java blueprints web site and wondered how many people follow these guidelines? Do you follow these guidelines, or do you let your IDE take control over your … Continue reading

Posted in Java | Tagged , | Leave a comment