Hi, don't know if this will help you, but as Pax-Exam does have a Karaf launcher, the sources might help you on finding a solution [1]
regards, Achim [1] - https://github.com/ops4j/org.ops4j.pax.exam2/blob/master/containers/pax-exam-container-karaf/src/main/java/org/ops4j/pax/exam/karaf/container/internal/KarafTestContainer.java#L200-L202 2017-03-09 18:46 GMT+01:00 ivoleitao <[email protected]>: > Hello again, > > I think we have a much harder problem in here. I think I have to give up > from this for now or make a completely new plugin. I've added the > java.library.path > also as a system property but it does not work also. I've came to the > conclusion by looking at the karaf launcher that we need the boot classpath > also and I don't now how to setup up that in an already launched vm. I > dont' think that is even possible :-S > > I'm refering to this: > > setupClassPath() { > # Add the jars in the lib dir > for file in "${KARAF_HOME}"/lib/boot/*.jar > do > if [ -z "${CLASSPATH}" ]; then > CLASSPATH="${file}" > else > CLASSPATH="${CLASSPATH}:${file}" > fi > done > } > > > > > On 9 March 2017 at 16:56, ivoleitao [via Karaf] < > [email protected]> wrote: > > > Hello, > > > > Thankyou. I've tried to correct this issue with the following code: > > > > private static final String JAVA_ENDORSED_DIRS = > > "java.endorsed.dirs"; > > private static final String JAVA_EXT_DIRS = "java.ext.dirs"; > > > > .... > > > > String endorsedDirs = System.getProperty(JAVA_ > ENDORSED_DIRS, > > ""); > > if (endorsedDirs != null && endorsedDirs.trim().length() > > > > 0) { > > endorsedDirs += ":"; > > } > > endorsedDirs += karafDirectory.getAbsolutePath() + > > "/lib/endorsed"; > > > > String extDirs = System.getProperty(JAVA_EXT_DIRS, ""); > > if (extDirs != null && extDirs.trim().length() > 0) { > > extDirs += ":"; > > } > > extDirs += karafDirectory.getAbsolutePath() + > "/lib/ext"; > > > > getLog().info("Setting system properties"); > > System.setProperty(JAVA_ENDORSED_DIRS, endorsedDirs); > > System.setProperty(JAVA_EXT_DIRS, extDirs); > > > > But I'm still having the same error. When I launch from the command line > > it works. I must be missing some additional stuff... > > Any ideia what could be ? > > > > ------------------------------ > > If you reply to this email, your message will be added to the discussion > > below: > > http://karaf.922171.n3.nabble.com/Run-goal-of-karaf-maven- > > plugin-does-not-configure-the-endorsed-folders-tp4049794p4049819.html > > To start a new topic under Karaf - User, email > > [email protected] > > To unsubscribe from Karaf - User, click here > > <http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro= > unsubscribe_by_code&node=930749&code=SXZvLmxlaXRhb0BnbWFpbC5jb218OT > MwNzQ5fDU3MDgwNzUzMw==> > > . > > NAML > > <http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_ > viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces. > BasicNamespace-nabble.view.web.template.NabbleNamespace- > nabble.view.web.template.NodeNamespace&breadcrumbs= > notify_subscribers%21nabble%3Aemail.naml-instant_emails% > 21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > > > > > > > -- > View this message in context: http://karaf.922171.n3.nabble. > com/Run-goal-of-karaf-maven-plugin-does-not-configure-the- > endorsed-folders-tp4049794p4049820.html > Sent from the Karaf - User mailing list archive at Nabble.com. > -- Apache Member Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead blog <http://notizblog.nierbeck.de/> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> Software Architect / Project Manager / Scrum Master
