Skip to content
Snippets Groups Projects
Commit 25e4c2c8 authored by tranoris's avatar tranoris
Browse files

with absolute path, fix for #16

parent 4212c633
No related branches found
No related tags found
1 merge request!12Merging 2024Q2_RC into main, creating 2024Q2 Release
Pipeline #4423 passed
...@@ -163,16 +163,13 @@ public class LCMRulesExecutor { ...@@ -163,16 +163,13 @@ public class LCMRulesExecutor {
* This is the location of the jar inside the running container * This is the location of the jar inside the running container
*/ */
String jarpath = new File(ClassLoader.getSystemClassLoader().getResource(".").getPath()).getAbsolutePath();
String path = LCMRulesExecutor.class.getProtectionDomain().getCodeSource().getLocation().getPath(); File classesJar = new File(jarpath);
String decodedPath = URLDecoder.decode(path, "UTF-8");
File classesJar = new File(decodedPath);
//File classesJar = new File("/opt/openslice/lib/org.etsi.osl.osom-1.2.0-SNAPSHOT.jar"); //File classesJar = new File("/opt/openslice/lib/org.etsi.osl.osom-1.2.0-SNAPSHOT.jar");
if ( classesJar.exists() ) { if ( classesJar.exists() ) {
optionList.addAll(Arrays.asList("-classpath", classesJar.getAbsoluteFile().toString() )); optionList.addAll(Arrays.asList("-classpath", classesJar.getAbsoluteFile().toString() ));
} }
logger.debug("jarpath = "+ decodedPath); logger.debug("jarpath = "+ jarpath);
logger.debug("optionList = "+ optionList.toString()); logger.debug("optionList = "+ optionList.toString());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment