Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Class can not be found Error
Class can not be found Error [message #328997] Tue, 10 June 2008 08:51 Go to next message
Eclipse UserFriend
Originally posted by: maxipower_q.yahoo.com

Hi,
I'm designing a plug-in and i need to get the workspace's path; so i'm
trying some code;

IWorkspace workspace = ResourcesPlugin.getWorkspace();
..
..

But first, i could not import library of "IWorkspace" and
"ResourcesPlugin".

i tried adding this library to my eclipse by;
project-> properties -> java build path -> add external jars

so i added; -found them in "C:\Program Files\eclipse\plugins"-
org.eclipse.core.resources.win32_3.3.0.v20070226.jar
org.eclipse.core.resources_3.3.1.R33x_v20080205.jar
org.eclipse.core.resources.compatibility_3.2.100.v20070502.j ar

now i can import their library "org.eclipse.core.resources"
But when i try to run the code, i get the "Class can not be found" runtime
error.

Can someone tell me where is the problem ? and how can i fix it ?
Or is there a way to get the workspace path without using this library?
Re: Class can not be found Error [message #328998 is a reply to message #328997] Tue, 10 June 2008 08:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Cumhur,

This is a recurring error that I see again and again. When building
plugins, don't ever mess with the classpath directly via the properties
of the project. Only edit the MANIFEST.MF and change the dependencies
in the Dependencies tab. Otherwise, the compile time problem you fix
will come back again at runtime.


Cumhur Kilic wrote:
> Hi, I'm designing a plug-in and i need to get the workspace's path; so
> i'm trying some code;
>
> IWorkspace workspace = ResourcesPlugin.getWorkspace();
> .
> .
>
> But first, i could not import library of "IWorkspace" and
> "ResourcesPlugin".
>
> i tried adding this library to my eclipse by; project-> properties ->
> java build path -> add external jars
>
> so i added; -found them in "C:\Program Files\eclipse\plugins"-
> org.eclipse.core.resources.win32_3.3.0.v20070226.jar
> org.eclipse.core.resources_3.3.1.R33x_v20080205.jar
> org.eclipse.core.resources.compatibility_3.2.100.v20070502.j ar
>
> now i can import their library "org.eclipse.core.resources"
> But when i try to run the code, i get the "Class can not be found"
> runtime error.
>
> Can someone tell me where is the problem ? and how can i fix it ?
> Or is there a way to get the workspace path without using this library?
>
Re: Class can not be found Error [message #329002 is a reply to message #328998] Tue, 10 June 2008 11:32 Go to previous message
Eclipse UserFriend
Originally posted by: maxipower_q.yahoo.com

Thanks a lot. It works. You really saved me .

Ed Merks wrote:

> Cumhur,

> This is a recurring error that I see again and again. When building
> plugins, don't ever mess with the classpath directly via the properties
> of the project. Only edit the MANIFEST.MF and change the dependencies
> in the Dependencies tab. Otherwise, the compile time problem you fix
> will come back again at runtime.
Previous Topic:Make TableLayoutComposite public
Next Topic:Cathc low level key events (like accent keys), possible in Eclipse?
Goto Forum:
  


Current Time: Thu Aug 08 14:20:36 GMT 2024

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

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

Back to the top