[Migrated content. Thread originally posted on 15 July 2011]
Hello,I want to use a java public class from a COBOL JVM project. The program I use in order to do this is named "Program1.cbl". Here you can see how simple it is:
program-id. Program1 as "Program1".
data division.
working-storage section.
77 cPantalla type pantalla.
77 text1 pic x(10).
procedure division.
display "Hello, I am Program1!".
set cPantalla to new type pantalla.
invoke cPantalla:open().
goback.
end program Program1.
In Properties->Java build path->Libraries I have included the runnable jar generated from the Java project. The jar file is stored at c:\\.
The IDE does not recognize the type "pantalla" presumably populated by the java package. And the following error occurs:
java.lang.NoClassDefFoundError: Program1
Caused by: java.lang.ClassNotFoundException: Program1
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)
Exception in thread "main"
Any ideas? What the heck am I doing wrong? Do you need the sample code?
Regards