there is no
import javax.mail.*;
in my java and net beans so how can i get those packages or what i have to do for importing that

Such question can be answer by simple google search
JavaMailAPI
Presuming that what ever you do is Web Project than in you should add mail archive to lib folder that can be found as PATH_TO_PROJECT/web/WEB-INF/lib. If the "lib" folder does not exist created it in described location and drop the jar file there. NetBeans should take care of rest of it

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.