Importing jar archives

4.44K viewsGeneral Discussion
0

Hi, I’m having trouble developing a plugin that uses external libraries located in a jar archive. Following the “Hello World” tutorial, could someone indicate how I can include a jar in the Eclipse project and have this exported into the plugin so that Quantrix and my class can find it?

I have tried a number of combinations, all ending with both my class and the jar archive included in the plugin jar, but Quantrix complains either of not finding the third party jar or not finding my class!

Thanks.

0

It works — excellent, many thanks!

I had worked all of it out except for the far-too-obvious “drag-and-drop onto the project name”. The project was previously only running in Quantrix when launched from Eclipse, but not standalone. This is now fixed.

I should mention what my plug-in does, as I know there has been some discussion here about scripting Quantrix.

My plug-in embeds Python (using the [url:212zl259]http://www.jython.org[/url:212zl259] implementation), so I can now do things like interact with a model via an embedded Python shell, add functions written in Python, etc.

This is very useful, as I can now easily add further extensions, but not bother with the compile-run-debug Java/Eclipse process — I can just add to a Python script (even at runtime!).

You are viewing 1 out of 5 answers, click here to view all answers.