Hello,
I have problem with ObjectInputStre am.ReadObject() method.
Code below
in main directory I have directory "currentTaskDir " with class "ClassName".cla ss.
Class c is loaded with custom loader from currentTaskDir directory.
Nevertheless, reading ObjectInputStre am takes into account only classes from classpath. I do not want to add currentTaskDir to classpath, because of further reloading class.
objectPassed is group of String and ClassName (c). How can I cast ois.ReadObject( ) to String and c?
Thank You for answers. I will be grateful for them.
Paul
I have problem with ObjectInputStre am.ReadObject() method.
Code below
Code:
FileClassLoader externalLoader = new FileClassLoader(currentTaskDir); Class c = externalLoader.loadClass(className); Method mlist[] = c.getDeclaredMethods(); Object[] objectsPassed = null; objectsPassed = (Object[])ois.readObject(); Object examinedObj = objectsPassed[0]; String methodName = (String)objectsPassed[1];
Class c is loaded with custom loader from currentTaskDir directory.
Nevertheless, reading ObjectInputStre am takes into account only classes from classpath. I do not want to add currentTaskDir to classpath, because of further reloading class.
objectPassed is group of String and ClassName (c). How can I cast ois.ReadObject( ) to String and c?
Thank You for answers. I will be grateful for them.
Paul