package javax.mail does not exist import javax.mail.Message;
Just to add on this are my steps which I did for both machines.
javac -version javac 1.6.0_22
935486 wrote:I suggest that the two machines were not installed following the same steps. It is probable that all you have to do is use the Centos package manager to remove version 6 of the JRE. Failing that, make sure that the JDK7 bin directory is ahead of the JRE6 bin directory in your PATH environmental variable.
Both machines were installed following the same steps. So what would have gone wrong then? Any bug here? The best part both are fresh machines and using same os centos 6.2
935486 wrote:JAVA_HOME is not involved when using 'javac' or 'java'' . Some applications such as Tomcat use JAVA_HOME but Java does not.
I have checked the ./bash_profile and it have no existing JAVA_HOME path set.
What could have gone wrong?Simple - you installed Java 6 as well as Java 7 and you are picking up the wrong javac.
I just isntall the jdk must I also install the jre or it comes togeter with the jdk right?What matters is not just what was installed but which the system finds first when you use the 'javac' command. This is where the PATH environment variable comes in. Spend some time learning about Linux/Unix.
echo $PATH /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
You have a difference between two Centos system. For us to help isolate the difference we must be given some access to some fundamental information. You seem reluctant to provide this information. To start with, for both system, publish
Below is the information for the problematic serverYou can see that "No such file or directory" in your path which means you have something wrong for PATH in your ./bash_profile
-bash: /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin: No such file or directory
b)which javacAt the very first post on this thread you mentioned about placing mail.jar into "/usr/java/jdk1.7.0_03/jre/lib/ext" folder so ideally you should be using "javac" from "/usr/java/jdk1.7.0_03/bin" unless that directory itself has not been moved elsewhere. As you mentioned that your "javac" is being picked up from "/usr/bin" when it should be from "/usr/java/jdk1.7.0_03/bin"
from your root directory and then update your path to use the correct javac.
find . -name javac