Results 1 to 4 of 4

Thread: eclipse , Access restriction

  1. #1
    Join Date
    Dec 2009
    Beans
    78

    eclipse , Access restriction

    im trying a java code that will send mail from the code

    i cant run it because im receiving this error and cant import method`s

    Code:
    import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
    import com.sun.xml.internal.fastinfoset.sax.Properties;
    import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
    Code:
      Access restriction: The type Message is not accessible due to restriction on required library /usr/lib/jvm/java-6-openjdk/jre/lib/rt
    thanks
    miki

  2. #2
    Join Date
    Apr 2006
    Beans
    800
    Distro
    Lubuntu 12.04 Precise Pangolin

    Re: eclipse , Access restriction

    It sounds like you need to use Sun Java instead of OpenJDK.

    Link: Eclipse and Sun Java (Sun JVM System Wide)

    1. Enable partner repo:
    Code:
    sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
    2. Install Sun Java 6 JDK
    Code:
    sudo aptitude install sun-java6-jdk
    3. Setup to use it as default (as described in above link)

  3. #3
    Join Date
    Dec 2009
    Beans
    78

    Re: eclipse , Access restriction

    i installed java-6 set it to defult ,removed the openjdk but same result...

    Code:
     Access restriction: The type Message is not accessible due to restriction on required library /usr/lib/jvm/java-6-sun-1.6.0.20/jre/

  4. #4
    Join Date
    Dec 2009
    Beans
    78

    Re: eclipse , Access restriction

    those import aren't in the original java Api so i dont to use them anyway

    thanks for the support

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •