Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

The import javax.mail cannot be resolved  RSS feed

 
Selecta Zhangy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


when i add these 2 import statements into my email validation class, it give me error say that 'The import javax.mail cannot be resolved'

how can i resolve them?

thanks
 
Jan van Mansum
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are trying to use the JavaMail API. It is not included in the JRE, so you need to download it and make sure the appropriate jar files are on the classpath when you compile your class.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have the JavaMail classes in your classpath? They usually come in two jar files named "mail.jar" and "activation.jar".
 
Selecta Zhangy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks guys!

i just downloaded JavaMail API 1.4.1, but how can i put it into my project in Eclipse???

[ November 16, 2007: Message edited by: Selecta Zhangy ]
[ November 16, 2007: Message edited by: Selecta Zhangy ]
 
Henry Wong
author
Sheriff
Posts: 23283
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on the version of eclipse that you are using -- they seem to love moving menus around ...


For mine, it is project -> properties -> Java build path -> libraries -> add external jars.


Henry
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!