Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Access restriction: The type 'String' is not API (restriction on required library '/opt/jdk1.7.0_51/(Neon.3 )
Access restriction: The type 'String' is not API (restriction on required library '/opt/jdk1.7.0_51/ [message #1767149] Sun, 02 July 2017 12:12 Go to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
Just one RCP 3 project out of 20 in the Neon.3 IDE has errors for all public APIs (Object, @Override, etc, etc, etc.) in the JRE. I restated, I did a project clean. How can this possibly be? I shouldn't have to change the access warnings, these are PUBLIC APIs. How do you get rid of this?

Re: Access restriction: The type 'String' is not API (restriction on required library '/opt/jdk1.7.0 [message #1767150 is a reply to message #1767149] Sun, 02 July 2017 13:03 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

What are the contents of its .classpath file?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Access restriction: The type 'String' is not API (restriction on required library '/opt/jdk1.7.0 [message #1767155 is a reply to message #1767150] Sun, 02 July 2017 15:22 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
Hi,

Firstly, you'd think you would not have to go outside the Eclipse IDE (.classpath is hidden in the IDE) to manage these things.

Here is the content of .classpath

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="src" path="ext"/>
	<classpathentry exported="true" kind="lib" path="lib/relaxngDatatype.jar" sourcepath="lib/src/relaxngDatatype-1.0.zip"/>
	<classpathentry exported="true" kind="lib" path="lib/xsom-20110101-SNAPSHOT.jar" sourcepath="lib/src/xsom-20110101-SNAPSHOT-sources.jar"/>
	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
	<classpathentry kind="src" path="test"/>
	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry kind="output" path="bin"/>
</classpath>


I did a comparison with one of the other .classpath files in one of my other projects. I never manually edit these normally, but I noticed the order was different. So I changed the one above to have the same order shown below. This solved the issue, Eclipse, flaky, it seemed to have changed the order for some reason...

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="src" path="ext"/>
	<classpathentry kind="src" path="test"/>
	<classpathentry exported="true" kind="lib" path="lib/relaxngDatatype.jar" sourcepath="lib/src/relaxngDatatype-1.0.zip"/>
	<classpathentry exported="true" kind="lib" path="lib/xsom-20110101-SNAPSHOT.jar" sourcepath="lib/src/xsom-20110101-SNAPSHOT-sources.jar"/>
	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
	<classpathentry kind="output" path="bin"/>
</classpath>

[Updated on: Mon, 03 July 2017 07:35]

Report message to a moderator

Re: Access restriction: The type 'String' is not API (restriction on required library '/opt/jdk1.7.0 [message #1767398 is a reply to message #1767155] Wed, 05 July 2017 15:46 Go to previous message
Eclipse UserFriend
You don't have to go outside of the IDE: those dot files are filtered using the Project Explorer filters. Remove the dot filter. Alternatively use Open Resources[/em] (Ctrl-Shift-R) and type .classpath[/em] and select the appropriate entry.

Since these are bundles, you can also use Properties > Plug-in Tools > Update Classpath... to regenerate the .classpath files.

Brian.
Previous Topic:Application does not start after adding an aditional OSGi declarative service.
Next Topic:paths and symbol question
Goto Forum:
  


Current Time: Fri Apr 26 06:14:32 GMT 2024

Powered by FUDForum. Page generated in 0.03565 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top