2
votes

In the WebSphere Application Server admin console, there is a section under Application servers > server1 > Process definition > Environment Entries

I don't understand what environment entries are. They are not system properties because they are defined in Process definition > Java Virtual Machine > Custom properties.

So what's that? How can they be accessed from within an application.

1

1 Answers

3
votes

Quoting http://www-01.ibm.com/support/docview.wss?uid=swg21254153 , official description is;

Environment entries can be used to specify variables not specific to WebSphere Application Server, but are defined by other elements, such as UNIX®, Language Environment® (LE), or third-party vendors, among others. These variables tend to be operating system-specific.

So they are OS specific (i.e PATH for Windows, LIBPATH for AIX, LD_LIBRARY_PATH for Solaris).

For an example case where usage is necessary; quoting http://publib.boulder.ibm.com/infocenter/dmndhelp/v7r0mx/topic/com.ibm.wbit.help.runtime.doc/deploy/topics/rcfglibadapters.html

If a native library is dependent on other native libraries, the dependent libraries must be configured on the LIBPATH of the JVM hosting the application server (rather than on the native path shown in the above figure) in order for that library to load successfully. You should configure an environment entry by selecting Servers > Application Servers > server_name > Java and Process Management > Process Definition > Environment Entries (where server_name is the name of the server; for example, server1). On the Environment Entries page, create a new environment entry to specify the LIBPATH of the JVM.

You can access these variables by using System.getenv() (not System.getProperties(), which returns custom properties and generic JVM arguments).