cancel
Showing results for 
Search instead for 
Did you mean: 

Java Applet and JCo

Former Member
0 Kudos

Hi,

I have a problem with Java Applet and JCo libraries to connect SAP R/3 and call some RFC. I've installed JCo following the tutorial, so the sapjco.jar is into the JAVA HOME/lib/ext folder and the dll (sapjcorf.dll and librfc32.dll) into the C:/WINDOWS/system32 folder. My JRE es 1.5.0_09.

When I test the applet within Eclipse Environment it works and retrieve data from RFC, but when I try to run it from an html page it throws the following exception:

<i>java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC' access denied (java.lang.RuntimePermission loadLibrary.sapjcorfc)</i>

I try to reinstall JCo but it doesn't work.

So, anyone got an idea how I can fix it?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

loading a DLL from applet would need special permissions using the policy file to be setup and the contents of your policy file should be similar to

grant {

permission java.lang.RuntimePermission loadLibrary.sapjcorfc;

};

try searching more on policy files / running your applet with specifying the policy file and exact syntax of the permission for loading the DLL as shown above.

Former Member
0 Kudos

Hi Amol,

I've solved the problem with a policy file.

Thanks a lot for your help.

Regards.

Answers (1)

Answers (1)

former_member187444
Participant
0 Kudos

Hi Juan;

I had same problem and i solved as

Message was edited by:

Eray