Plugin jar on classpath of JavaCommandLineState

Is there a way using the OpenAPI to find the path to my plugin jar? I am using the JavaCommandLineState class and would like to implicitly add my plugin's jar file to the classpath using JavaParameters.getClassPath().add(..).

Or is there another why how to run the JavaCommandLineState classs and have my plugin jar on the classpath.

Thanks for any help!

--Etienne

2 comments
Comment actions Permalink

Try this:

String path = PathUtil.getJarPathForClass(getClass());

etienne wrote:

Is there a way using the OpenAPI to find the path to my plugin jar? I am using the JavaCommandLineState class and would like to implicitly add my plugin's jar file to the classpath using JavaParameters.getClassPath().add(..).

Or is there another why how to run the JavaCommandLineState classs and have my plugin jar on the classpath.

Thanks for any help!

--Etienne


--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0
Comment actions Permalink

Hi Martin

Thanks for the hint which works fine!

--Etienne

0

Please sign in to leave a comment.