D
dushkin
Hello All...
I am trying to load an xml file out of a jar file. In a directory I
have 2 jar files, both have the same named xml file.
Please read the following code:
*****************************************************************
URL[] arr = {new URL("http://dummy.com")};
arr[0] = new URL("file://.//" + m_sComponentName + ".jar");
jcl=new URLClassLoader(arr);
urlCommandsFile =
jcl.getResource(Common_ST.instance().COMMANDS_FILE_NAME);
*****************************************************************
evertything works virtually fine, without exceptions, but when I
inspect urlCommandsFile.getPath(), I see that the path is of the
neighbour jar file and not of the loaded jar!!!
How can it be???
I use eclipse and both jars are inside the project.
Thanks.
I am trying to load an xml file out of a jar file. In a directory I
have 2 jar files, both have the same named xml file.
Please read the following code:
*****************************************************************
URL[] arr = {new URL("http://dummy.com")};
arr[0] = new URL("file://.//" + m_sComponentName + ".jar");
jcl=new URLClassLoader(arr);
urlCommandsFile =
jcl.getResource(Common_ST.instance().COMMANDS_FILE_NAME);
*****************************************************************
evertything works virtually fine, without exceptions, but when I
inspect urlCommandsFile.getPath(), I see that the path is of the
neighbour jar file and not of the loaded jar!!!
How can it be???
I use eclipse and both jars are inside the project.
Thanks.