[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: Class not found even though jar file is in classpath

I think I got the problem: ( .... re-reading the thread before sending this,
I saw that Jed Anderson got it much earlier ;-)
you forgot to import your jar file as a library for your plugin.
I would say what the "classpath" is for a java application, that is the
"plugin.xml" for eclipse plugins (diss me if not so :-).
look at the documentation for the plugin.xml (or "plugin.xml"s of other
plugins :-) for details.
maybe this helps.
and your 2nd question about the difference between  class- and buildpath:
there is no difference if you start a java application (static void
main(String[] args)) with the run/debug ActionButton (you can see this
classpath, if you switch to the debug perspective and select in the
"Processes" view the process you started -> contextMenu -> properties).
concerned a plugin the buildpath is for building then you have to specify
your requirements in YourPlugins 's "plugin.xml".

snippet from the antsupport's plugin.xml:
...
<runtime>
    <library name="ant.jar">                                             <<<
here are the jars needed by ant
        <export name="*"/>
<<< (they need to be in the plugins root dir,
    </library>
<<< if specified like this)

    <library name="antsupport.jar">
        <export name="*"/>
    </library>

    <library name="jakarta-ant-1.3-optional.jar">
        <export name="*"/>
    </library>
</runtime>

<requires>
<<< here the plugins needed for ant
    <import plugin="org.eclipse.core.resources"/>
    <import plugin="org.apache.xerces"/>
</requires>
....

"Erik Hilliard" <erik.hilliard@xxxxxxxxxxx> schrieb im Newsbeitrag
news:9nicjs$52q$1@xxxxxxxxxxxxxxxx
> Peter,
>
> Good point about the word app.  Basically, it is a java application that I
> think I'm force feeding into Eclipse.  This might be my problem.  I have
> taken the approach to start my "app" by creating an action set that when
> clicked opens up a SWT display that is used for logging in.  When 'OK' is
> clicked, a SelectionListener handles this and sends a request to a web
> server.  The request is run by using a method inside the action set class
> that calls another class outside the action set.
>
> The request is performed by the web server, and my code then tries to
> process the response.  This is also done outside the action set class.  My
> processResponse() method calls a static method on a class.  This is the
> class that is not found.
>
> Not found in the classpath does indeed mean not found in the build path.
> What is the exact difference between the two?  Hope this helps.
>