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=SXZvLmxlaXRhb0BnbWFpbC5jb218OTMwNzQ5fDU3MDgwNzUzMw==>
> .
> 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.

Reply via email to