Skip to main content
Skip table of contents

Starting Model Server

NexJ Model Server runs the NexJ applications deployed on the server. You can start Model Server using a batch file (modeld.bat) on Windows or using a shell file ( on Linux. Both these files are located in the <SERVER_HOME>\bin directory.

You can use the modeld.bat -? in Windows or the ./ -? command in Linux to view all Model Server options.

To start Model Server on Windows:

  1. Open a Command Prompt window using the Run As Administrator option.
  2. From the <SERVER_HOME>/bin directory, run the following command:
    modeld.bat [-dsmj] ["-D..."] ["-X..."] [options]

To start Model Server on Linux:

  1. Open a terminal.
  2. From the <SERVER_HOME>/bin directory, run the following command:
    ./ [-dsmj] ["-D..."] ["-X..."] [options]


-d <number>
Enables remote debugging on the specified port number, for example, -d 7777.

Suspends JVM until a debugger connects. Ignored unless -d is also specified.

-m <number>
Sets the heap size, for example, -m 1024M or -m 1G.

-j <filename>
Loads JVM arguments from the specified custom file instead of loading them from jvm.conf.

Specifies JVM properties to pass through to the application. For example, use -Dnexj.ajp.port=8509 to set the AJP port to 8509.


Model Server options require a space between the option and option value. JVM options do not require a space. Additionally, values that contain a space must be enclosed in quotation marks.

Specifies additional JVM options that can be passed to the JVM to overwrite batch file defaults. For example, use -Xss4096k to change the default thread stack size.

-c url
Path to the node configuration file, for example, -c <SERVER_HOME>/modeld.conf.

-n name
Node name, for example, -n node1.

-o number
Port offset number, for example, -o 100.

-l name
Path to the log file directory, for example, -l <SERVER_HOME>/logfile.log

-C url
Path to the environment file, for example, -C <SERVER_HOME>/workspace/env/envFile.environment.

-P url
Path to the environment properties file, for example, -P <SERVER_HOME>/workspace/env/ If you want to issue the -P command, ensure that an environment file exists and has been specified using the -C command.

-M url
Path to the metadata directory, for example, -M <SERVER_HOME>/workspace/meta.

To shut down the server, press Ctrl+C in the command line and then press Y when prompted.

Invoking tools using or modeld.bat

You can use the model.bat or files to invoke specific tools available in NexJ Studio. This allows you to perform a recreate during Model Server deployment.
The following is an example command to run a specified unit test using modeld.bat:

modeld.bat <-Dnexj.bootstrap.classpath.suffix=d:<classpath>\*.jar> "-Dnexj.uitest.webdriverDir=c:\java" "-Dnexj.uitest.headless=false" -C "C:\<project>\env\Development.environment" -P "C:\<project>\env\" -M "meta://<project>" main perftest

You can also pass the same arguments to the Model Server docker image. For example, you can use the Model Server docker image as the initialization container for Kubernetes to perform a recreate.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.