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

0
Avatar
Permanently deleted user

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

Hi Martin

Thanks for the hint which works fine!

--Etienne

0

请先登录再写评论。