1 2 Previous Next 19 Replies Latest reply: May 27, 2012 8:07 PM by handat Go to original post RSS
      • 15. Re: package javax.mail does not exist for centos 6.2
        sabre150
        Nitin Khare wrote:
        a) PATH
        -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
        You can see that "No such file or directory" in your path which means you have something wrong for PATH in your ./bash_profile
        I think it is more likely that instead of using
        echo $PATH
        that he just used
        $PATH
        This of course will try to execute the content of the PATH environment variable and not list it and gives the "No such file or directory" error he reports.

        To my mind the OP has two possible actions. He can remove the offending Java 6 using the package manager or he can modify the PATH environment variable so that the Java 7 bin directory is ahead of the other bin directories. The first option would be my preferred one.
        • 16. Re: package javax.mail does not exist for centos 6.2
          938489
          Dear Nitin,
          I run this find . -name javac and get no results. Just to share with all this line addition seem to solve the problem alternatives --install /usr/bin/javac javac /usr/java/jdk1.7.0_04/bin/javac 20000.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
          • 17. Re: package javax.mail does not exist for centos 6.2
            handat
            Basically, you forgot to link your javac in /usr/bin/javac to the javac in your JDK 1.7 bin directory properly. On the server where it is working, this has been done, whereas on the server where it is not working, /usr/bin/javac is linked to the javac in the JDK 1.6 bin directory.
            935486 wrote:
            rpm -Uvh /usr/local/jdk-7u3-linux-x64.rpm
            alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 20000
            alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 20000
            alternatives --config java
            From the steps you have done, you did not perform an alternatives for javac, only for java and javaws

            So javac got linked somehow, but inconsistently.
            • 18. Re: package javax.mail does not exist for centos 6.2
              938489
              Dear Handat,
              Anything else I must be linking on the linux platform? Thank you.
              • 19. Re: package javax.mail does not exist for centos 6.2
                handat
                935486 wrote:
                Dear Handat,
                Anything else I must be linking on the linux platform? Thank you.
                Well, there are quite a few things you need to link if you want every JDK tool to work from the /usr/bin directory, but for compiling only, linking javac is sufficient. You may want to link javadoc and jar as well, but there are quite a lot of other utilities which is way to cumbersome to link them all. It is better just to add your JDK's bin directory to your PATH.
                1 2 Previous Next