Opened 14 years ago
Last modified 14 years ago
#7703 closed defect
How to get resources from inside plugin? — at Version 1
| Reported by: | kendzi | Owned by: | team |
|---|---|---|---|
| Priority: | critical | Milestone: | |
| Component: | Core | Version: | |
| Keywords: | Cc: |
Description (last modified by )
In plugin loading class I try to get resource file from my plugin jar (kendzi3d.jar) using call:
getClass().getResource(“/resources/pluginProperties.properties”);
but in response I get:
jar:file:/C:/Documents%20and%20Settings/kendzi/Dane%20aplikacji/JOSM/plugins/ImportImagePlugin.jar!/resources/pluginProperties.properties
So url is pointing to file inside different plugin! ImportImagePlugin plugin have file with same name.
call to getClass()
result:
class kendzi.josm.kendzi3d.Kendzi3DPlugin (inside kendzi3d.jar)
It seems that it is bug with plugin class loader.
Or there is any other way to get files from my plugin jar?


