on 01-16-2007 4:14 PM
Hai,
I have created a JAVA program to call a SAP function. The JAVA project is in the path C:\MY Documents\. I have copied all the required jar files from the folder C:\Program Files\SAP\JDT\eclipse\plugins\ and copied to path C:\lib and then added to my project using the option add JAR files by refering the path C:\lib. When i executed the project i got a error "Could not load middleware layer com.sap.mw.jco.rfc.MiddlewareRFC'. Then i found the program is looking for sapjcorfc.dll file and this file was under the path C:\Program Files\SAP\JDT\eclipse\plugins\com.sap.mw.jco\lib.
Then i added the required JAR files from the path C:\Program Files\SAP\JDT\eclipse\plugins\ instead of refering from C:\lib. After this the program is working correctly eventhough i just added the jar file sapjco.jar under the folder C:\Program Files\SAP\JDT\eclipse\plugins\com.sap.mw.jco\lib without adding the sapjcorfc.dll.
Then i created a jar file for my project by using the packaging method "Link via manifest and copy files to" lib\. In this step the dll file is not linked.
I put this jar file in path e:\ and created a folder e:\lib and put all my jar files and dll file there. When i executed this jar from a *.bat file using the command
set path=E:\novell\consoleone\1.2\jre\bin
java -jar SchedulerManagerSwing
pause
I got the error "Could not load middleware layer com.sap.mw.jco.rfc.MiddlewareRFC'." which i got when i developed this project.
I think the error is due to sapjcorfc.dll. Please let me know how to link this DLL with jar file and let me know how to solve this problem.
Thanks & Regards,
H.K.Hayath Basha.
Hai All,
Thanks a lot. Not the problem is solved.
I added sapjcorfc.dll is my class path as follows,
Manifest-Version: 1.0
Class-Path: classes12.jar lib/jsse.jar lib/ldap.jar lib/aii_proxy_gen.
jar lib/aii_proxy_rt.jar lib/aii_util_misc.jar lib/SAPmdi.jar lib/sap
jco.jar lib/sapjcorfc.dll
Created-By: IntelliJ IDEA
Main-Class: pm2s.ep.resetpassword.EPResetPwdSchedulerManagerSwing
My .bat file code is,
set path=E:\novell\consoleone\1.2\jre\bin
java -jar EPResetPwdSchedulerManagerSwing
pause
No need to use -Djava command in .bat file
I added librfc32.dll in C:\WINNT\System32 path only
Regards,
Basha/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hai All,
Thanks a lot. Not the problem is solved.
I added sapjcorfc.dll is my class path as follows,
Manifest-Version: 1.0
Class-Path: classes12.jar lib/jsse.jar lib/ldap.jar lib/aii_proxy_gen.
jar lib/aii_proxy_rt.jar lib/aii_util_misc.jar lib/SAPmdi.jar lib/sap
jco.jar lib/sapjcorfc.dll
Created-By: IntelliJ IDEA
Main-Class: pm2s.ep.resetpassword.EPResetPwdSchedulerManagerSwing
My .bat file code is,
set path=E:\novell\consoleone\1.2\jre\bin
java -jar EPResetPwdSchedulerManagerSwing
pause
No need to use -Djava command in .bat file
I added librfc32.dll in C:\WINNT\System32 path only
Regards,
Basha/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
also put the sapjco.jar in the java extension classes folder. jdk\jre\lib\ext\
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
put the sapjcorfc.dll in the system32 folder of windows. If it still does not work also put the librfc.dll in that came with the JCo zip file in the system32 folder. be careful and don't overwrite the existing librfc.dll in the folder. just rename it so you still have a copy. sometimes sapgui doesn't work with the librfc.dll file that comes shipped with JCo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hai,
I have tried the below combinations still i am getting the same error with a additional message "The procedure entry point RfcDsrInit could not be located in the dynamic link library LIBRFC32.dll"
set path=E:\novell\consoleone\1.2\jre\bin
java -jar SchedulerManagerSwing.jar
-Djava.library.path=E:\LDAP_Admin\exe\lib\sapjcorfc.dll
pause
or
set path=E:\novell\consoleone\1.2\jre\bin
java -jar SchedulerManagerSwing.jar
-Djava.library.path=E:\LDAP_Admin\exe\lib\
pause
Regards,
H.K.Hayath Basha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Say your Java program is in C:\temp.
1. Put your librfc32.dll in System32 folder & C:\temp.
2. Put your sapjcorfc.dll in C:\temp.
3. Then either you uncompress sapjco.jar(jar -xvf sapjco.jar) to C:\temp. or "set classpath=C:\temp\sapjco.jar;".
Then try tunning your program.
Regards,
Nagarjuna.
you should add next parameter for jvm:
-Djava.library.path=<path to sapjcorfc.dll>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.