I have started working on a project that deals with SAP JCo (SAP JAVA Connector).
I have set the classpath for sapjco.jar and fortunately my programs are compiling well and generating a .class file, but I am unable to execute the same. When I type in the following command:
c:> java <my_prog_name>
It gives me an error: "Error: Could not find or load main class <my_prog_name>"
If anyone has some tips, kindly let me know.
I'm also having NetBeans IDE for development help, if any one is very much conversant with it and knows the easy way out, then please do not hesitate to share.
Any opinion or clue is highly welcomed and appreciated.
Thanking you in advance.
Sorry for a late response from my side.
Actually I tried doing that, as I mentioned I was able to create a .class file for which I did go to the respective path where my source is and then I tried to run the file using "java <file name>" command.
But it gave me an error, which says, "Cannot load or find main".
Please let me know if you have any other solution.
Edited by: Dmukhi on Feb 28, 2012 12:37 AM
How to install the library sapjco.jar is:
u2022Once downloaded the appropriate file (depending on the version of operating system you're using), unzip it into a directory of your choice.The test, in our case, we have made using Windows Vista.
u2022If you have an older version of the dll librfc32.dll in the windows system32 directory, substitute it with the coming of Sap.
u2022Include the installation directory in the PATH environment variable (in our case c: \ sapjco).
u2022Finally, we add to the CLASSPATH environment variable sapjco.jar file with full path (for example, CLASSPATH = c: \ sapjco \ sapjco.jar).
Then install the library in the directory of classes and found that Talend is properly installed.To do this, we drop the file in the directory sapjco.jar <directorio_instalacion_talend> \ lib \ java. Talend then opened, and the Modules tab, check that appears sapjco.jar module installed correctly
That class file is available under C: folder then finally where the .class file is in command prompt and then try to execute it. Please read this [Help|http://help.sap.com/saphelp_nw04/helpdata/en/47/80f671ee6e4b41b63c0fe46bd6e4f8/content.htm]
Hope this helps!!
Thanks for your extended help.
But my SAP JCo.zip file consisted of only two files namely, sapjco3.jar and sapjco3.dll. I do not see any librfc.dll file.
I loaded both the files in my classpath and path variable. As I mentioned I am able to compile the files but not run it.
I want to know how you can run it, which command to use for it.