heather

Acessing resources in plugin jar file

Discussion created by heather on Oct 20, 2006
Latest reply on Oct 20, 2006 by heather

I want to be able to access files that I''ve built into my plugin (the ones you place in /lib when you''re doing the ant jar stuff).

I want to access them through Java though, none of this C:\path\to\Spark\plugins\pluginName\lib\blah.dll

 

I know I need to do something along the lines of this.getClass().getClassLoader().getResource("/blah.dll")

 

but this doesn''t seem to work, it returns null. I only seem to be able to access the classes in plugin-classes.jar   

 

How do I get it to spot the files that we place in /lib ?

This must be possible since the import statements know to look in /lib for the necessary Jar files there for importing right?

 

maybe I should be using the PluginClassLoader() I''m thinking, but not sure what to put for the params....

 

:: shakes head :: I''ve been trying to figure this out all day. Any help would be great.

 

Message was edited by: heather

Outcomes