Why do I keep getting the following exception when using POP with JavaMail? Exception in thread "main" java.lang.NoSuchFieldError: contentStream

John Zukowski

This happens when you mix the JavaMail 1.1 and JavaMail 1.2 runtime classes. If I remember correctly, you are using the 1.1 POP classes with the 1.2 core classes. Check your CLASSPATH and remove the 1.1 classes (or the 1.2 ones). Remember that 1.2 comes with a POP3 provider in the main mail.jar file so you don't need to add another.