hello all,
i am trying to use the reflector and so i have the following code in my Client.java
Class c = Class.forName("Job");
Method meth = c.getMethod(jobServers[0].functionName);
meth.invoke(jobServers[0].objServerRef, theCallbackObjectRef, number, jobServers);
the 1st problem i encounter is that the Job class is declared in a package called WorkflowFramework and when i run my program i get a class not found exception!!!
FileClient Error: Job
java.lang.ClassNotFoundException: Job
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at Client.main(Client.java:117)
In my code, i import the correct package with the "import WorkflowFramework.*;" declaration and when i put the mouse over the word Job of Class c = Class.forName("Job"); declaration i get the proper path...(I use eclipse) => WorkflowFramework/Job.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from WorkflowFramework.idl
Can you help me? what is going on? why the Class.forName function cannot find my class?? why it cannot resolve the path with the package?
ps. please dont tell me to copy the java file where the client.java file is...