0

I have following code in the my plug-in project

Class.getResourceAsStream("/file.png");

And my file is placed in the src/main/resources.

When I run my plug-in application from the eclipse run configuration dialog everything is fine. But, when I install mentonied plug-in on the standalone instance of the eclipse, have null pointer exception.

I have add my resources folder to the jar in following way.

source.. = src/main/java/
output.. = bin/
bin.includes = META-INF/,\
               .,\
               target/dependency/jfxrt-8.0.jar,\
               src/main/resources/

               target/dependency/jfxrt-8.0.jar

But, meanwhile problem is present.

Where I'm wrong and how to solve my problem?

Regards, Vladimir

  • Check that file is actually present in `jar`. – talex Nov 02 '16 at 14:45
  • It's present - I have check – Vladimir Kozhaev Nov 02 '16 at 15:20
  • 1
    *Where* is it in the jar, and what does the manifest say is the plug-in's classpath? – nitind Nov 02 '16 at 15:23
  • Well, structure of the jar is following / com - there is *.class files meta-inf\ MANIFEST.MF src \main \resources - my png files there target Classpath from manifest.mf is Bundle-ClassPath: . – Vladimir Kozhaev Nov 02 '16 at 19:25
  • There is my MANIFEST.MF Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: MyEditor Bundle-SymbolicName: myview Bundle-Version: 1.0.0.qualifier Bundle-Vendor: IDC Require-Bundle: Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . Export-Package: – Vladimir Kozhaev Nov 02 '16 at 19:43

0 Answers0