Tag Archives: Java

Socket code – answer

Did you spot the bug? The server writes to the socket using: The client reads using: However, the PrintWriter write method doesn’t put a carriage return at the end of the data. Hence, no matter how much data the server … Continue reading

Posted in Java | Tagged | Leave a comment

Socket code – spot the bug

Recently I’ve been trying to test some code that interacts with a third party over http. I’d like to test as much of the code as possible, not just the code that prepares the data, but also the code that … Continue reading

Posted in Java | Tagged | Leave a comment

Printing Ant classpaths

Debugging Ant classpaths can be a bit of a pain, but the following link shows you how to print them out: http://www.javalobby.org/java/forums/t71033.html Even better, you can do a pretty version using: http://blog.andrewbeacock.com/2005/08/pretty-printing-java-classpaths-using.html

Posted in Ant, Java | Tagged , | Leave a comment