I have the Java EE version of Eclipse. But whenever I try to import any packages contained in Java EE, the program says "import javax.mail cannot be resolved" None of the packages contained in Java EE work.
Am I missing something? I assumed EE was the same as SE, but every time I try to download EE they seem to want me to make a glassfish server. Do I really need to do that just to get EE to work? I do not care about getting glassfish to work at all. At this point I hope to never use glassfish.
解决方案
You need to add server runtime libraries.The server runtime libraries have all the JavaEE libraries.
To make it work,install a Java EE server like Glassfish or Tomcat or JBoss etc.
Right click on your project in eclipse->Configure BuildPath->Click on Libraries->Click on Add Library->Click on Server Runtime->Select the server which you have installed.