I have created a Method and a job. I created a java class file for the Job to call.
Method name :MyMethod
Job name: MyJob
Javaclass name: MyClass
The Method is correctly selected in the General tab of the job
The Job is of type: java
Run as the servder
the Command: MyClass
If i compile the class from the Command line i get no errors:
public class MyClass
{
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("May I take your order?");
}
}
If i java -cp . MyClass It functions as expected.
But it fails to run when installed into composer.
It should be noted that if i add anything to the class even something simple like
import com.documentum.fc.common.IDfException;
public class createfolders
{
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("May I take your order?");
}
}
It will compile but then it will not run I get the error:
C:\Users\dmadmin\workspace\CreateFolders\src>java -cp . MyClass
Exception in thread "main" java.lang.NoClassDefFoundError: MyClass
Caused by: java.lang.ClassNotFoundException: MyClass
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
Could not find the main class: MyClass. Program will exit.
Anyone seen this before?