cancel
Showing results for 
Search instead for 
Did you mean: 

Where can I change the setting of java.library.path?

Former Member
0 Kudos

In System Info page (http://<hostname>:50000/sap/monitoring/SystemInfo)

Dear Experts,

I found there're 3 processes under Instance. They are dispatcher, server0 and SDM.

under server0, there're two links

1) system properties

2) vm properties

my question are

1. what's the difference between these two properties?

2. how can I change the java.library.path property of the system properties?

Thanks.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi, Yi Ning,

I try to write a Web Dynpro app. to call legacy system Cobol programs that I need to load Cobol run time libary. I think SAP J2EE server have some problem when load dll files via run time java.library.path. However I walk around this problem by copy the *dll files to a java.library.path location which you can view it from Monitor System Info. In this way, I don't need to setup new java.library.path in my java class. hope it workes for you.

Former Member
0 Kudos

Thanks, YiNing,

I can set java.library.path to <<my library path>> in runtime by following your instruction, and it is correct when display it. But I cannot load a library "wrun32.dll" in <<existing my library path>>. it give me an error message that cannot find "wrun32.dll" in library. any idea?

Former Member
0 Kudos

Hi, Andy.

What a coincidence. I've been suffering from the same problem for a long time, and at last I gived up.

I was trying to use JNI on SAP J2EE Engine, but it fails.

Are you also trying to do that?

wrun32.dll, is this file specified for 32bit system? Is your system 32bit? I know if you use the wrong version dll, the exception java throws would be "can't not find the file". Hope it helps.

If you success on solving this problem, pliz let me know. So that I can believe SAP J2EE engine is okay, and there's something wrong with my own perspect. Hope so.

Thank you.

Former Member
0 Kudos

Hi,

Is someone able to answer this issue? I have same problem with YiNing Mao.

Hope to be hear from you.

Kind regards

Former Member
0 Kudos

Well, actually the java.library.path of the system.property is just a monitor for system.

At last I solved my problem in program.

I used

Property property = System.getProperty();

property.put("java.library.path",

property.get("java.library.path") + <your library path>);

to solve this problem.

And remember to remove this property in the end of your program, or the path in java.library.path would be duplicated.

Hope it helps.

Former Member
0 Kudos

By referinng to http://help.sap.com/saphelp_nw04/helpdata/en/18/58dc3efc966856e10000000a114084/frameset.htm,

"The system properties monitored by the Monitoring Service are the properties provided by System.getProperties();. For more information, see java.lang.System in the JDK API documentation."

I've run a test in my plain Java, by using -D option of java can change specific system property, for instance ,"java.library.path".

Now I've add some -D options into the vm property of J2EE Engine through offline tools, and it is showed correctly in "vm properties". But don't know why, the "system properties" showed in "System Info" page doesn't match up to it. Thus, the application I deploy to the J2EE Engine can't find some libraries in the specified library directory.

Why the -D option of VM parameter doen't effect on the system properties in SAP J2EE Engine?

Hope you understand my question. Looking forward to your reply.