Hey,
i have following problem: I wrote a plugin-framework and a testplugin. The testplugin is a jar file and also contains some Properties - files for i18n.
Loading the classes during runtime works properly but my i18n Message class cannot find the resourceBundle, i always get an MissingResource Exception.
But when i add the testplugin Jarfile to the classpath of my startscript it works!
So my idea was to add the properties files to the classpath at runtime, is this possible? Or what else can i do? I tried this code to add them to the classpath:
File jarFile = new File(pathToJar);
URL urlOfJarFile = null;
try {
urlOfJarFile = jarFile.toURL();
} catch (MalformedURLException e) {}
URLClassLoader urlcl = new URLClassLoader(new URL[] { urlOfJarFile });
try {
clazz = Class.forName(strPackage, true, urlcl);
urlcl.getResource("com/myProject/messages_de.properties"));
urlcl.getResource("com/myProject/messages.properties"));
} catch (ClassNotFoundException e) {}
Thanks alot....
Thomas
Message was edited by:
OhNo