Results 1 to 8 of 8
  1. #1
    miko5054 is offline Member
    Join Date
    Mar 2010
    Posts
    50
    Rep Power
    0

    Default eclipse , Access restriction

    m 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

    Java 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;
    Java 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
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,816
    Rep Power
    25

    Default

    What program Is that message from? The IDE, javac.exe or java.exe

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,732
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by miko5054 View Post
    m 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

    Java 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;
    Those com.sun.* classes are none of our business (they're not in a public API) and they're not needed because Sun publishes a publicly available API that can handle mail conversations.

    kind regards,

    Jos

  4. #4
    miko5054 is offline Member
    Join Date
    Mar 2010
    Posts
    50
    Rep Power
    0

    Default

    i forgot few things that important.... im using ubuntu....

    check this link...

    eclipse , Access restriction - Ubuntu Forumseclipse , Access restriction - Ubuntu Forums

  5. #5
    miko5054 is offline Member
    Join Date
    Mar 2010
    Posts
    50
    Rep Power
    0

    Default

    now i have problem with ,
    the javax.mail classes
    The import javax.mail cannot be resolved
    ????

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,732
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by miko5054 View Post
    now i have problem with ,
    the javax.mail classes
    Did you download and install the package? It's a javax package so it belongs in your JRE/lib/ext directory where it always can be found.

    kind regards,

    Jos

  7. #7
    miko5054 is offline Member
    Join Date
    Mar 2010
    Posts
    50
    Rep Power
    0

    Default

    no i didn't do u knew how to install it in ubuntu??

  8. #8
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,732
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by miko5054 View Post
    no i didn't do u knew how to install it in ubuntu??
    My previous reply already told you where to put the .jar file. I guess you can find the download site yourself.

    kind regards,

    Jos

Similar Threads

  1. Access Restriction error
    By kraut in forum New To Java
    Replies: 2
    Last Post: 06-19-2010, 02:29 AM
  2. Access Restriction error
    By kraut in forum Eclipse
    Replies: 0
    Last Post: 06-19-2010, 02:07 AM
  3. Replies: 7
    Last Post: 02-19-2010, 12:03 PM
  4. Access restriction error in eclipse
    By Steffan in forum New To Java
    Replies: 0
    Last Post: 02-03-2010, 05:03 PM
  5. Error: Access restriction
    By livnihai in forum Eclipse
    Replies: 1
    Last Post: 11-25-2009, 07:53 PM

Posting Permissions

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