Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can not add properties to java.util.Properties object

J. NewmanDec 6 2010 — edited Dec 7 2010
To the experienced:

I am trying my hands on JaveMail in JDeveloper 11.1.1.3. I followed some classic instructions (all tutorial materials gave the same instructions):

import javax.mail.*;
import java.util.*;

...

Properties props = new Properties();
props.put("transport.protocol", "smtp");


My understanding is that Properties is in the java.util package, which has been imported; and "put" is one of the methods that Code Insight pops up after I typed a dot after props. But I am caught by JDeveoper, which says "Type 'props.put' not found". And I get stuck there. What could be wrong?

Thanks for helping!


Newman
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 4 2011
Added on Dec 6 2010
2 comments
304 views