webMathematica > Configuration >

KernelInitializeCode

KernelInitializeCode
Mathematica code to run during kernel startup
  • KernelInitializeCode is a configuration setting giving Mathematica code that runs when a kernel is launched by the server. It can be used to load common packages and tools that are used by the server.
A sample setting is shown below. This loads an application and then uses a function from the application. Notice how it has to use the fully qualified name for the function.
<KernelInitializeCode>
Needs[ "MyApplication`"];
MyApplication`LaunchConnection[];
</KernelInitializeCode>