Eclipse plugin - wrong jar used on runtime -


I have a serious problem with my Eclipse plugin ..

My plugin is dependent on two other plugins All plugins (including my plugins) use the Mozilla Rhino engine - two of them use js.jar (version 1.4). But my plugin uses the new version, which is not yet released and packed in MyRhino.jar .

While developing, everything gets better - by the completion of the code, I get classes and methods, special versions of the count, no errors etc.

But when I run my plugin, a different version of Rhino is used and I get a runtime exception such as Klansotfound expletion and so on.

Should I let Eclipse use the same jar in the runtime as the development time?

When I was developing plugins on NetBusiness, the solution was simple- to wrap the jar in a different module, set which packages to export and declare the dependency on this new module. I have found an equal solution in eclipse, although it does not work for me - although I have announced dependency on the wrapper plugin, packages and classes were not available even during development.

I have spent hours with this probleam and have not solved it, so more help is appreciated. thanks all.

Ensure that your dependency is correct, if your code relies on the new version of the library, then you This will indicate that in your MANIFEST.MF if you need bundle org.mozilla.rhino, then specify the minimum version:

  Required-bundle: org.mozilla.rhino; Bundle-version = "1.5.0"  

Your MyRhino.jar must specify the correct version (such as 1.5.0), even if it has not yet been released:

  bundle-version: 1.5.0.qualifiers  

(If MyRhino.jar has not yet been converted into a plugin, you can manually You need to do this: you can only orient the new plug-in project by using existing jar in Eclipse)

Alternatively, you can use MyRhin in your plugin Wrap up o.jar, and remove dependencies on other plugins. To do this, use bundle-class path (see for details). If you put your MyRhino.jar directly into your plugin, then there should be bundle-classpath:

  bundle-classpath:., MyRhino.jar  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -