• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Access restriction on rt.jar file in Eclipse

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using javax.activation.DataHandler class from rt.jar file in my program. But it is giving me error as access restriction. Error is access to jre/lib/rt.jar is restricted. So please suggest me solution for this problem.
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Dipti, and welcome to the Ranch!

Can you plase TellTheDetails about what you're doing and where the error is coming from? How are you running your program? Is it an applet, a standalone app, or something else? Are you running it inside Eclipse? If so, have you tried running on the command line? What are the permission settings on the rt.jar file, and which user owns it? Is this error message part of an exception with stack trace? If so, please copy/paste the whole error message. Or is it coming from outside the execution of your program?

The more details you provide about what you're doing and what results you're seeing, the better the chance somebody will be able to help you.
 
Dipti Mogare
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using the import javax.activation.DataHandler.
And from this import using storeDocument() method.
I am getting access restriction error in import javax.activation.DataHandler statement.
And i am running this program as stand alone application in Eclipse IDE. Error is coming at the compile time.
And error message is access to jre/lib/rt.jar is restricted. I have added jre6 in build path.
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dipti Mogare wrote:Hi,
I am using the import javax.activation.DataHandler.
And from this import using storeDocument() method.
I am getting access restriction error in import javax.activation.DataHandler statement.
And i am running this program as stand alone application in Eclipse IDE. Error is coming at the compile time.
And error message is access to jre/lib/rt.jar is restricted. I have added jre6 in build path.



And that's the exact wording that Eclipse is giving you? "access to jre/lib/rt.jar is restricted"? And nothing more?

Did you try googling for, say, access to jre/lib/rt.jar is restricted eclipse?

Did you try compiling on the command line, outside of Eclipse, to see if the problem is in your Eclipse setup or your Java installation?
 
Dipti Mogare
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi jeff.
I found the solution for above problem. I just removed jre from build path and again added the same jre. And an error was removed.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic