Accessing classes from plugin [message #528043] |
Mon, 19 April 2010 02:05  |
Eclipse User |
|
|
|
beginner question.
I created a plug-in from existing jar files and installed it.
What do I need to do to access the classes in the jar file(s) that are part of the above plug-in in a class from simple java project?
thanks,
P
|
|
|
|
Re: Accessing classes from plugin [message #528180 is a reply to message #528122] |
Mon, 19 April 2010 11:34   |
Eclipse User |
|
|
|
thanks for the response.
I do have these packages exported as but when I try to do import of any of these packages in the java source, the code completion does not find the packages.
e.g. I can not access com.prasad.myclasses.* in my java code even though I see the plug-in installed. The other packages are the ones consumed by the classes in com.prasad....
I looks like following in manifest.mf
Export-Package:
com.prasad.myclasses
com.prasad.myclasses.utils
....
org.apache.commons.codec,
org.apache.commons.codec.binary,
org.apache.commons.codec.digest,
org.apache.commons.codec.language,
org.apache.commons.codec.net,
org.apache.commons.httpclient,
org.apache.commons.httpclient.auth,
org.apache.commons.httpclient.cookie,
org.apache.commons.httpclient.methods,
org.apache.commons.httpclient.methods.multipart,
org.apache.commons.httpclient.params,
org.apache.commons.httpclient.protocol,
org.apache.commons.httpclient.util,
org.apache.commons.logging,
org.apache.commons.logging.impl,
org.w3._2001.xmlschema
[Updated on: Mon, 19 April 2010 11:42] by Moderator
|
|
|
|
|
|
|
Re: Accessing classes from plugin [message #605613 is a reply to message #528122] |
Mon, 19 April 2010 11:34   |
Eclipse User |
|
|
|
thanks for the response.
I do have these packages exported as but when I try to do import of any of these packages in the java source, the code completion does not find the packages.
e.g. I can not access com.prasad.myclasses.* in my java code even though I see the plug-in installed. The other packages are the ones consumed by the classes in com.prasad....
I looks like following in manifest.mf
Export-Package: com.vmware.vcloud.api.rest.schema,
com.prasad.myclasses
com.prasad.myclasses.utils
....
org.apache.commons.codec,
org.apache.commons.codec.binary,
org.apache.commons.codec.digest,
org.apache.commons.codec.language,
org.apache.commons.codec.net,
org.apache.commons.httpclient,
org.apache.commons.httpclient.auth,
org.apache.commons.httpclient.cookie,
org.apache.commons.httpclient.methods,
org.apache.commons.httpclient.methods.multipart,
org.apache.commons.httpclient.params,
org.apache.commons.httpclient.protocol,
org.apache.commons.httpclient.util,
org.apache.commons.logging,
org.apache.commons.logging.impl,
org.w3._2001.xmlschema
|
|
|
|
|
|
Re: Accessing classes from plugin [message #605623 is a reply to message #605621] |
Mon, 19 April 2010 15:51  |
Eclipse User |
|
|
|
Flavio Vit wrote on Mon, 19 April 2010 14:31
> You need to add to the classpath the new plugin source (as long as it is open in your workspace) or a jar file if it is already deployed.
>
> I think adding the individual jar file(s) worked. I was somehow expecting more magical I guess. Not sure what difference it makes to be jar in plug-in other than simply dropping the jar in the project. Definitely update site functionality can be plus. Will spend more time with this.
>
> If as source, right clicking on the Java project -> Properties -> Java Build path -> Projects -> Add, then add the plugin.
Thanks a lot all the help.
|
|
|
Powered by
FUDForum. Page generated in 0.05024 seconds