0

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.

0

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

| improve this answer | |
  • I loaded the jar file to the directory, added it the classpath, and it seems to work. – TallGuy Apr 3 at 18:35
0

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 ;))

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.