How to get CachedRowSet implementation by Sun in my Java project? [duplicate] - java

I'm attempting to compile Java 1.4 code that was created by IBM's WSDL2Java on Java5 without recreating the stubs and saw this error in Eclipse.
I'm under the assumption that the stubs generated should just compile as long as the runtime jars are available (they are).
Access restriction: The type QName is not accessible due to restriction on required library C:\Program Files\Java\jdk1.5.0_16\jre\lib\rt.jar
The full class name is javax.xml.namespace.QName
What exactly is going on here? Is this a case where I am trying to refactor a pig from sausage? Am I better off recreating the stubs?

There's another solution that also works.
Go to the Build Path settings in the project properties.
Remove the JRE System Library
Add it back; Select "Add Library" and select the JRE System Library. The default worked for me.
This works because you have multiple classes in different jar files. Removing and re-adding the JRE lib will make the right classes be first.
If you want a fundamental solution make sure you exclude the jar files with the same classes.
For me I have: javax.xml.soap.SOAPPart in three different jars: axis-saaj-1.4.jar, saaj-api-1.3.jar and the rt.jar

http://www.digizol.com/2008/09/eclipse-access-restriction-on-library.html worked best for me.
On Windows: Windows -> Preferences -> Java -> Compiler -> Errors/Warnings
-> Deprecated and restricted API -> Forbidden reference (access rules): -> change to warning
On Mac OS X/Linux: Eclipse -> Preferences -> Java -> Compiler -> Errors/Warnings
-> Deprecated and restricted API -> Forbidden reference (access rules): -> change to warning

I met the same problem. I found the answer on the website: http://www.17ext.com.
First, delete the JRE System Libraries. Then, import JRE System Libraries again.

My guess is that you are trying to replace a standard class which ships with Java 5 with one in a library you have.
This is not allowed under the terms of the license agreement, however AFAIK it wasn't enforced until Java 5.
I have seen this with QName before and I "fixed" it by removing the class from the jar I had.
EDIT
http://www.manpagez.com/man/1/java/ notes for the option "-Xbootclasspath:"
"Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license."
The http://www.idt.mdh.se/rc/sumo/aJile/Uppackat/jre/LICENSE
"Java Technology Restrictions. You may not modify the Java
Platform Interface ("JPI", identified as classes contained
within the "java" package or any subpackages of the "java"
package), by creating additional classes within the JPI or
otherwise causing the addition to or modification of the
classes in the JPI. In the event that you create an
additional class and associated API(s) which (i) extends
the functionality of the Java platform, and (ii) is exposed
to third party software developers for the purpose of
developing additional software which invokes such
additional API, you must promptly publish broadly an
accurate specification for such API for free use by all
developers. You may not create, or authorize your
licensees to create, additional classes, interfaces, or
subpackages that are in any way identified as "java",
"javax", "sun" or similar convention as specified by Sun in
any naming convention designation."

I have been getting this error too, but my project is built on the command line using Maven and the tycho compiler (it's a set of OSGi plugins). After masses of sifting through people having the same problem but fixing it in Eclipse rather than on the command line, I found a message on the Tycho developer forum that answered my question, using configuration in pom.xml to ignore the compiler warning about the access restriction:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<compilerArgument>-warn:+discouraged,forbidden</compilerArgument>
</configuration>
</plugin>
More information can be found in the Tycho FAQ. This took me AGES to work out, so I figured I would assist anyone else trying to fix these access restriction errors from the command line by posting this answer.

Go to the Build Path settings in the project properties.
Windows -> Preferences -> Java Compiler
Remove the JRE System Library
Add another JRE with a "perfect match"
clean and build your project again. It worked for me.

I just had this problem too. Apparently I had set the JRE to 1.5 instead of 1.6 in my build path.

In addition to Nels Beckman's solution, I have the following tips:
Under Configure Build Path, I had to rearrange the order of my entries under Order and Export.
Additionally, as an Eclipse PDE developer, I needed to rearrange the order of my dependencies in my MANIFEST.MF, adding the problematic package as first on the list.
Playing with these dials, along with running Project > Clean in between, I was able to resolve these warnings.

for me this how I solve it:
go to the build path of the current project
under Libraries
select the "JRE System Library [jdk1.8xxx]"
click edit
and select either "Workspace default JRE(jdk1.8xx)" OR Alternate JRE
Click finish
Click OK
Note: make sure that in Eclipse / Preferences (NOT the project) / Java / Installed JRE ,that the jdk points to the JDK folder not the JRE C:\Program Files\Java\jdk1.8.0_74

Sorry for updating an old POST. I got the reported problem and I solved it as said below.
Assuming you are using Eclipse + m2e maven plugin, if you get this access restriction error, right click on the project/module in which you have the error --> Properties --> Build Path --> Library --> Replace JDK/JRE to the one that is used in eclipse workspace.
I followed the above steps and the issue is resolved.

In the case you are sure that you should be able to access given class, than this can mean you added several jars to your project containing classes with identical names (or paths) but different content and they are overshadowing each other (typically an old custom build jar contains built-in older version of a 3rd party library).
For example when you add a jar implementing:
a.b.c.d1
a.b.c.d2
but also an older version implementing only:
a.b.c.d1
(d2 is missing altogether or has restricted access)
Everything works fine in the code editor but fails during the compilation if the "old" library overshadows the new one - d2 suddenly turns out "missing or inaccessible" even when it is there.
The solution is a to check the order of compile-time libraries and make sure that the one with correct implementation goes first.

Go to the Java Build Path in the project properties. Remove the existing JRE System Library
Then Add it again i.e. Add Library-->JRE Lib--select jre--->Finish.
Lastly select order and export tab select JRE Lib and move on top. That's it.

Just change the order of build path libraries of your project. Right click on project>Build Path> Configure Build Path>Select Order and Export(Tab)>Change the order of the entries. I hope moving the "JRE System library" to the bottom will work. It worked so for me. Easy and simple....!!!

In my case there was a mismatch between the build path JRE and installed JRE on execution environment. I moved into Project > Properties > Java compiler. There was a warning message at the bottom.
I clicked on the links 'Installed JRE', 'Execution environment', 'Java build path' and changed the JDK version to 1.7 and the warning disappeared.

Adding a right JRE System through build path is the solution but your eclipse still may have the error.
To solve that go to Java Build path --> Order and Export and move your JRE system library on the top. This has solved my problem.

Related

How to make Eclipse compile patched modules on JDK 9+ by passing the --patch-module javac option to my project compiler? (see pic)

Eclipse has to allow that, since javac from JDK allows it without requiring me to contact the CIA for clearance. If eclipse does not allow that, what other Java IDE would allow me. Worst-case scenario I'll just use emacs and terminal.
Screenshot:
Most of the relevant information has already been given in comments, I'm mostly summing it up with a little background and some links:
Firstly, Eclipse does not accept a folder named java.base within your source folder. Such layout is used by javac's multi-module mode, but in an IDE like Eclipse that mode is not needed, since we have projects for grouping the modules. In particular Eclipse requires that each project contains at most one module. Now you are free to either (a) define src/main/java/java.base as a source folder, or (b) move its content one level up (so that packages start directly in src/main/java as in the olden days).
Secondly, for setting up options like --patch-module the UI has been revamped in Eclipse 2019-06, so I suggest to upgrade Eclipse (if not already done). Then you will find a new tab in the Java Build Path configuration dialog called "Module Dependencies" where you can mark your project as patching java.base. (The method from older versions of Eclipse was: find a node "Is Modular" below the library you want to patch and edit (double click) its details. This mode is still supported for a migration period, but it is no longer recommended).
Thirdly, the Java Build Path, which is used for building/compiling (as the name suggests :) ), should also be respected for launching. To make sure that compile-time and runtime see the same set of options, both dialogs (Java Build Path and Run as ...) have a button for showing the textual form of the configured options (called JPMS options in the build path configuration).

Why is eclipse restricted from here [duplicate]

I'm attempting to compile Java 1.4 code that was created by IBM's WSDL2Java on Java5 without recreating the stubs and saw this error in Eclipse.
I'm under the assumption that the stubs generated should just compile as long as the runtime jars are available (they are).
Access restriction: The type QName is not accessible due to restriction on required library C:\Program Files\Java\jdk1.5.0_16\jre\lib\rt.jar
The full class name is javax.xml.namespace.QName
What exactly is going on here? Is this a case where I am trying to refactor a pig from sausage? Am I better off recreating the stubs?
There's another solution that also works.
Go to the Build Path settings in the project properties.
Remove the JRE System Library
Add it back; Select "Add Library" and select the JRE System Library. The default worked for me.
This works because you have multiple classes in different jar files. Removing and re-adding the JRE lib will make the right classes be first.
If you want a fundamental solution make sure you exclude the jar files with the same classes.
For me I have: javax.xml.soap.SOAPPart in three different jars: axis-saaj-1.4.jar, saaj-api-1.3.jar and the rt.jar
http://www.digizol.com/2008/09/eclipse-access-restriction-on-library.html worked best for me.
On Windows: Windows -> Preferences -> Java -> Compiler -> Errors/Warnings
-> Deprecated and restricted API -> Forbidden reference (access rules): -> change to warning
On Mac OS X/Linux: Eclipse -> Preferences -> Java -> Compiler -> Errors/Warnings
-> Deprecated and restricted API -> Forbidden reference (access rules): -> change to warning
I met the same problem. I found the answer on the website: http://www.17ext.com.
First, delete the JRE System Libraries. Then, import JRE System Libraries again.
My guess is that you are trying to replace a standard class which ships with Java 5 with one in a library you have.
This is not allowed under the terms of the license agreement, however AFAIK it wasn't enforced until Java 5.
I have seen this with QName before and I "fixed" it by removing the class from the jar I had.
EDIT
http://www.manpagez.com/man/1/java/ notes for the option "-Xbootclasspath:"
"Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license."
The http://www.idt.mdh.se/rc/sumo/aJile/Uppackat/jre/LICENSE
"Java Technology Restrictions. You may not modify the Java
Platform Interface ("JPI", identified as classes contained
within the "java" package or any subpackages of the "java"
package), by creating additional classes within the JPI or
otherwise causing the addition to or modification of the
classes in the JPI. In the event that you create an
additional class and associated API(s) which (i) extends
the functionality of the Java platform, and (ii) is exposed
to third party software developers for the purpose of
developing additional software which invokes such
additional API, you must promptly publish broadly an
accurate specification for such API for free use by all
developers. You may not create, or authorize your
licensees to create, additional classes, interfaces, or
subpackages that are in any way identified as "java",
"javax", "sun" or similar convention as specified by Sun in
any naming convention designation."
I have been getting this error too, but my project is built on the command line using Maven and the tycho compiler (it's a set of OSGi plugins). After masses of sifting through people having the same problem but fixing it in Eclipse rather than on the command line, I found a message on the Tycho developer forum that answered my question, using configuration in pom.xml to ignore the compiler warning about the access restriction:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<compilerArgument>-warn:+discouraged,forbidden</compilerArgument>
</configuration>
</plugin>
More information can be found in the Tycho FAQ. This took me AGES to work out, so I figured I would assist anyone else trying to fix these access restriction errors from the command line by posting this answer.
Go to the Build Path settings in the project properties.
Windows -> Preferences -> Java Compiler
Remove the JRE System Library
Add another JRE with a "perfect match"
clean and build your project again. It worked for me.
I just had this problem too. Apparently I had set the JRE to 1.5 instead of 1.6 in my build path.
In addition to Nels Beckman's solution, I have the following tips:
Under Configure Build Path, I had to rearrange the order of my entries under Order and Export.
Additionally, as an Eclipse PDE developer, I needed to rearrange the order of my dependencies in my MANIFEST.MF, adding the problematic package as first on the list.
Playing with these dials, along with running Project > Clean in between, I was able to resolve these warnings.
for me this how I solve it:
go to the build path of the current project
under Libraries
select the "JRE System Library [jdk1.8xxx]"
click edit
and select either "Workspace default JRE(jdk1.8xx)" OR Alternate JRE
Click finish
Click OK
Note: make sure that in Eclipse / Preferences (NOT the project) / Java / Installed JRE ,that the jdk points to the JDK folder not the JRE C:\Program Files\Java\jdk1.8.0_74
Sorry for updating an old POST. I got the reported problem and I solved it as said below.
Assuming you are using Eclipse + m2e maven plugin, if you get this access restriction error, right click on the project/module in which you have the error --> Properties --> Build Path --> Library --> Replace JDK/JRE to the one that is used in eclipse workspace.
I followed the above steps and the issue is resolved.
In the case you are sure that you should be able to access given class, than this can mean you added several jars to your project containing classes with identical names (or paths) but different content and they are overshadowing each other (typically an old custom build jar contains built-in older version of a 3rd party library).
For example when you add a jar implementing:
a.b.c.d1
a.b.c.d2
but also an older version implementing only:
a.b.c.d1
(d2 is missing altogether or has restricted access)
Everything works fine in the code editor but fails during the compilation if the "old" library overshadows the new one - d2 suddenly turns out "missing or inaccessible" even when it is there.
The solution is a to check the order of compile-time libraries and make sure that the one with correct implementation goes first.
Go to the Java Build Path in the project properties. Remove the existing JRE System Library
Then Add it again i.e. Add Library-->JRE Lib--select jre--->Finish.
Lastly select order and export tab select JRE Lib and move on top. That's it.
Just change the order of build path libraries of your project. Right click on project>Build Path> Configure Build Path>Select Order and Export(Tab)>Change the order of the entries. I hope moving the "JRE System library" to the bottom will work. It worked so for me. Easy and simple....!!!
In my case there was a mismatch between the build path JRE and installed JRE on execution environment. I moved into Project > Properties > Java compiler. There was a warning message at the bottom.
I clicked on the links 'Installed JRE', 'Execution environment', 'Java build path' and changed the JDK version to 1.7 and the warning disappeared.
Adding a right JRE System through build path is the solution but your eclipse still may have the error.
To solve that go to Java Build path --> Order and Export and move your JRE system library on the top. This has solved my problem.

eclipse external tools configurations -> referenced library in classpath does not exist: org.eclipse.swt

After updating to the latest eclipse mars release
Version: Mars Release Candidate 1 (4.5.0RC1)
Build id: 20150521-1252
I am not able to start any Ant Script. It always results in the following error:
First I checked if the path is really correct, and made sure that the specific jar org.eclipse.swt.win32.win32.x86_64_3.104.0.v20150513-1901.jar exists at the given location, which it does. After some digging I noticed the following within the external tools configurations:
Somehow I think eclipse is not able to resolve the classpath with the given '%20' tag within the url to the library. Usually there is just a blank. Restoring the defaults always fills in the '%20' for this specific library.
So I created a copy of eclipse at a location without blanks and all works fine again.
Unfortunatly I would prefer keeping the location at it is, so is there a way to correctly resolve the classpath for Additional Tasks & Support?
There is one other "fix" that's basically an easier workaround.
If you go to your Ant build configuration (under External Tools, then highlight your configuration and select the JRE tab) and change from running an external JRE to the top button, that is, "Run in the same JRE as the workspace", this will make it work.
This is a known bug in Eclipse Mars:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=470390
Update: Eclipse 4.5.1 was released on October the 2nd and the bug has been fixed. An Eclipse update will resolve this issue.
I resolved this by moving C:\Program Files\eclipse to C:\eclipse
Answer also found here, Eclipse Mars: ANT Task references missing SWT library

Why won't Eclipse let me use the JFrame class? [duplicate]

I'm attempting to compile Java 1.4 code that was created by IBM's WSDL2Java on Java5 without recreating the stubs and saw this error in Eclipse.
I'm under the assumption that the stubs generated should just compile as long as the runtime jars are available (they are).
Access restriction: The type QName is not accessible due to restriction on required library C:\Program Files\Java\jdk1.5.0_16\jre\lib\rt.jar
The full class name is javax.xml.namespace.QName
What exactly is going on here? Is this a case where I am trying to refactor a pig from sausage? Am I better off recreating the stubs?
There's another solution that also works.
Go to the Build Path settings in the project properties.
Remove the JRE System Library
Add it back; Select "Add Library" and select the JRE System Library. The default worked for me.
This works because you have multiple classes in different jar files. Removing and re-adding the JRE lib will make the right classes be first.
If you want a fundamental solution make sure you exclude the jar files with the same classes.
For me I have: javax.xml.soap.SOAPPart in three different jars: axis-saaj-1.4.jar, saaj-api-1.3.jar and the rt.jar
http://www.digizol.com/2008/09/eclipse-access-restriction-on-library.html worked best for me.
On Windows: Windows -> Preferences -> Java -> Compiler -> Errors/Warnings
-> Deprecated and restricted API -> Forbidden reference (access rules): -> change to warning
On Mac OS X/Linux: Eclipse -> Preferences -> Java -> Compiler -> Errors/Warnings
-> Deprecated and restricted API -> Forbidden reference (access rules): -> change to warning
I met the same problem. I found the answer on the website: http://www.17ext.com.
First, delete the JRE System Libraries. Then, import JRE System Libraries again.
My guess is that you are trying to replace a standard class which ships with Java 5 with one in a library you have.
This is not allowed under the terms of the license agreement, however AFAIK it wasn't enforced until Java 5.
I have seen this with QName before and I "fixed" it by removing the class from the jar I had.
EDIT
http://www.manpagez.com/man/1/java/ notes for the option "-Xbootclasspath:"
"Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license."
The http://www.idt.mdh.se/rc/sumo/aJile/Uppackat/jre/LICENSE
"Java Technology Restrictions. You may not modify the Java
Platform Interface ("JPI", identified as classes contained
within the "java" package or any subpackages of the "java"
package), by creating additional classes within the JPI or
otherwise causing the addition to or modification of the
classes in the JPI. In the event that you create an
additional class and associated API(s) which (i) extends
the functionality of the Java platform, and (ii) is exposed
to third party software developers for the purpose of
developing additional software which invokes such
additional API, you must promptly publish broadly an
accurate specification for such API for free use by all
developers. You may not create, or authorize your
licensees to create, additional classes, interfaces, or
subpackages that are in any way identified as "java",
"javax", "sun" or similar convention as specified by Sun in
any naming convention designation."
I have been getting this error too, but my project is built on the command line using Maven and the tycho compiler (it's a set of OSGi plugins). After masses of sifting through people having the same problem but fixing it in Eclipse rather than on the command line, I found a message on the Tycho developer forum that answered my question, using configuration in pom.xml to ignore the compiler warning about the access restriction:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<compilerArgument>-warn:+discouraged,forbidden</compilerArgument>
</configuration>
</plugin>
More information can be found in the Tycho FAQ. This took me AGES to work out, so I figured I would assist anyone else trying to fix these access restriction errors from the command line by posting this answer.
Go to the Build Path settings in the project properties.
Windows -> Preferences -> Java Compiler
Remove the JRE System Library
Add another JRE with a "perfect match"
clean and build your project again. It worked for me.
I just had this problem too. Apparently I had set the JRE to 1.5 instead of 1.6 in my build path.
In addition to Nels Beckman's solution, I have the following tips:
Under Configure Build Path, I had to rearrange the order of my entries under Order and Export.
Additionally, as an Eclipse PDE developer, I needed to rearrange the order of my dependencies in my MANIFEST.MF, adding the problematic package as first on the list.
Playing with these dials, along with running Project > Clean in between, I was able to resolve these warnings.
for me this how I solve it:
go to the build path of the current project
under Libraries
select the "JRE System Library [jdk1.8xxx]"
click edit
and select either "Workspace default JRE(jdk1.8xx)" OR Alternate JRE
Click finish
Click OK
Note: make sure that in Eclipse / Preferences (NOT the project) / Java / Installed JRE ,that the jdk points to the JDK folder not the JRE C:\Program Files\Java\jdk1.8.0_74
Sorry for updating an old POST. I got the reported problem and I solved it as said below.
Assuming you are using Eclipse + m2e maven plugin, if you get this access restriction error, right click on the project/module in which you have the error --> Properties --> Build Path --> Library --> Replace JDK/JRE to the one that is used in eclipse workspace.
I followed the above steps and the issue is resolved.
In the case you are sure that you should be able to access given class, than this can mean you added several jars to your project containing classes with identical names (or paths) but different content and they are overshadowing each other (typically an old custom build jar contains built-in older version of a 3rd party library).
For example when you add a jar implementing:
a.b.c.d1
a.b.c.d2
but also an older version implementing only:
a.b.c.d1
(d2 is missing altogether or has restricted access)
Everything works fine in the code editor but fails during the compilation if the "old" library overshadows the new one - d2 suddenly turns out "missing or inaccessible" even when it is there.
The solution is a to check the order of compile-time libraries and make sure that the one with correct implementation goes first.
Go to the Java Build Path in the project properties. Remove the existing JRE System Library
Then Add it again i.e. Add Library-->JRE Lib--select jre--->Finish.
Lastly select order and export tab select JRE Lib and move on top. That's it.
Just change the order of build path libraries of your project. Right click on project>Build Path> Configure Build Path>Select Order and Export(Tab)>Change the order of the entries. I hope moving the "JRE System library" to the bottom will work. It worked so for me. Easy and simple....!!!
In my case there was a mismatch between the build path JRE and installed JRE on execution environment. I moved into Project > Properties > Java compiler. There was a warning message at the bottom.
I clicked on the links 'Installed JRE', 'Execution environment', 'Java build path' and changed the JDK version to 1.7 and the warning disappeared.
Adding a right JRE System through build path is the solution but your eclipse still may have the error.
To solve that go to Java Build path --> Order and Export and move your JRE system library on the top. This has solved my problem.

Eclipse Plugin - Unable to Resolve Swing Class References

(Disclaimer: Neither of the following are true: (1) Java is my forte, and (2) I'm a pro at Plug-in development.)
My Eclipse plug-in project includes 5 plugins. 2 of them compile just fine. The 3 that don't include dependencies on classes in the org.eclipse.swt.widgets or org.eclipse.swt.graphics packages. The (extremely annoying) compile-time error message is:
The type org.eclipse.swt.widgets.Control cannot be resolved.
It is indirectly referenced from required .class files.
Now, I've been over this workspace with a fine-toothed comb. I've checked and rechecked the following:
Classpaths. Check! (The appropriate JRE and JDK are on the Windows PATH.)
Dependencies. Check! (All libraries are included.)
Build Path. Check! (Using the right JRE, importing all necessary libraries, build order is correct.)
Imports. Check! (Yep. The correct libraries are imported as shown in the dialog.)
Manifest.MF. Check! (Double-checked the manifest file to make sure the paths are right. All three projects are referencing the same file from the same JRE.)
Plugin.XML. Check! (Yeah, the file is fine.)
.ClassPath file. Check! (No problem here, either. The classpath files are all fine.)
build.properties file. Check! (No surprises here, either.)
I've googled and stackoverflowed till my eyes are bleeding. None of the typical suggestions seem to be helping.
I'm certain however, that the usual truth is going to prove to be the case here. (All things being equal, the answer is usually something simple, stupid, and painfully obvious.)
Can someone kindly suggest something I haven't yet looked at? I'm more than willing to provide whatever information you may require.
P.S. And might I note that there are way too many places to look to configure dependencies for plugins? Great googly moogly.
There is a disconnect between your target platform and the swt plugins available in your environment.
In eclipse, go to Help -> Preferences -> Target Platform.
Select your target platform and click on [Edit...].
In the dialog, select the "Environment" tab.
The fields in the "Target Environment" will be used to load your swt plug-in. The any field not filled in, will default to the values detected for the current environment.
In your case, you have an win32.x86 swt jar. If you are running on 64-bit windows, and the Architecture field is blank, your 32-bit swt jar will not load. You have two options to fix any discrepancies:
Install an eclipse platform pack. It will contain all the swt jars for all the platforms.
Make the "Target Environment" fields match the swt jar you have available.
That basically means that it is an indirect unsatisfied dependency: a class from a library you're using needs some other class to be on the class-path :)
Now I have no idea how you manage your dependencies (maven or manually) but as a starting point you could use jarfinder.com to find and download the necessary library if you don't have it already:
http://www.jarfinder.com/index.php/java/info/org.eclipse.swt.widgets.Control
If you're using Maven, you should look in the logs as it tries to download all the necessary libraries, dependencies included. So if anything went wrong it should point out in the log a connectivity problem or the impossibility of downloading an artefact for some other reason.
open eclipse IDE
select menu project->clean
close eclipse IDE
delete .swt from /home/user/.swt
re-open eclipse and fix message

Categories