PDA

View Full Version : Java library access restriction



Z.K.
May 12th, 2011, 06:39 PM
I am getting this error when I try to use the rxtx library in eclipse.



Access restriction: The type CommPortIdentifier is not accessible due to restriction on required library /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar


How do I fix this, do I have to change the permissions?

:confused:

r-senior
May 12th, 2011, 07:38 PM
Do these help?

http://www.eclipsezone.com/eclipse/forums/t97259.html
http://lkamal.blogspot.com/2008/09/eclipse-access-restriction-on-library.html

anadikumar
September 1st, 2012, 04:36 PM
:p
1. Go to the Build Path settings in the project properties.
2. Remove the JRE System Library
3. Add it back; Select "Add Library" and select the JRE System Library.
The default has worked for my friends as well.
It works because we have multiple classes in different jar files. Removing and re-adding the jre lib will make the right classes be first.

Regards,
Anadi Kumar
Patna, Bihar (INDIA)
Have 4.75 years of IT (Java-Development & Design) experience.
Worked @
1. Persistent System Ltd.
2. HSBC Global Tech. (India) Ltd.
3. TechMahindra Ltd.
Email-ID:anadikumar@gmail.com
Cell/Mobile No.: +91-8055992543.