Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to get the resources when the plugin install at eclipse??(How to get the resources when the plugin install at eclipse??)
How to get the resources when the plugin install at eclipse?? [message #909403] Fri, 07 September 2012 01:03 Go to next message
Eclipse UserFriend
I develop a plugin which can copy a file from to another folder.
I can debug/running the plugin at workspaces.but can't running after drop it in plugins folder.
How can i get the resources under the plugin folder?

the code is
 Bundle bundle = Platform.getBundle(Activator.PLUGIN_ID);
resourceFile = FileLocator.toFileURL(bundle.getResource(File.separatorChar +"template" + File.separatorChar + fileType.getName()));


error is:
java.lang.NullPointerException
at org.eclipse.core.internal.runtime.Activator.getURLConverter(Activator.java:321)
at org.eclipse.core.runtime.FileLocator.toFileURL(FileLocator.java:205)

[Updated on: Fri, 07 September 2012 01:19] by Moderator

Re: How to get the resources when the plugin install at eclipse?? [message #909408 is a reply to message #909403] Fri, 07 September 2012 01:11 Go to previous messageGo to next message
Eclipse UserFriend
i also use the classloader to find the resources. but it's same as up!
resourceFile = this.getClass().getClassLoader().getResource(File.separatorChar + "template" + File.separatorChar + fileType.getName());
Re: How to get the resources when the plugin install at eclipse?? [message #909410 is a reply to message #909408] Fri, 07 September 2012 01:19 Go to previous message
Eclipse UserFriend
anybody can help me?
eclipse version 3.6
JDK 6
Previous Topic:Incomplete code AST
Next Topic:Is there a way to annotate methods that are overridden in subclasses?
Goto Forum:
  


Current Time: Wed Jul 23 18:02:45 EDT 2025

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

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

Back to the top