Finding JAVAX.Mail Jar

I have been using eclipse to code and test my software on Windows. When I copy the code to Ubuntu, I cannot compile the code as it cannot find the Javax files to import. I know I need to add the classpath where the jar file is located. My question is where or what name is the jar file? Any suggestions much appreciated.

Compile statement
javac eMail.java

Java code
import javax.mail.Folder;
import javax.mail.Message;

Error
import javax.mail.Folder;
^ eMail.java:7: error: package javax.mail does not exist

for each import statement.

2 Answers

As far as I know the mail library has always been an external download. It's currently located on github at . Download it and add it to your classpath in Eclipse.

1

If you developed on Windows first you have to take into account what Build Paths your project had in there. I think you could take two approach to solve this:

1-Screnshot/Write down build path and project preferences from Windows and try to replicate that on your Linux dev machine, see eclipse documentation

2-Export your Windows projects and then import them on Linux, please see this StackOVerflow question

Also I think you shouldn't asking here for locations of jar files from your projects, If you are the developer you should know where the files needed by your projects are(Just IMHO, don't take this as a personal attack please ;))

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like