Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. READ MORE

Talend Studio: Set a JVM property for all the Jobs executed by a JobServer on Windows / Linux

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
TalendSolutionExpert
Contributor II
Contributor II

Talend Studio: Set a JVM property for all the Jobs executed by a JobServer on Windows / Linux

Last Update:

Jan 22, 2024 9:35:30 PM

Updated By:

Jamie_Gregory

Created date:

Apr 1, 2021 5:56:06 AM

In some cases, it is necessary to set a JVM property, for example -Dfile.encoding=UTF-8, for all Jobs executed by a JobServer.

Resolution

For the JobServer Windows Service created by the installer:

  1. Edit the wrapper.conf file located in the folder \jobserver\TalendServices\conf, and add the line:
    wrapper.app.env._JAVA_OPTIONS=-Dfile.encoding=UTF-8

    Under the paragraph:

    #*******************************************************************
    # Application environment properties.
    #*******************************************************************
    # Adds an environment to the application

    Example:

    #*******************************************************************
    # Application environment properties.
    #*******************************************************************
    # Adds an environment to the application
    wrapper.app.env._JAVA_OPTIONS=-Dfile.encoding=UTF-8
  2. Restart the JobServer.

For a JobServer created with jsl_static64.exe:

  1. In the jsl_static64.ini file, add the following to the beginning of the file:
    [defines]
    _JAVA_OPTIONS=-Dfile.encoding=UTF-8
    export=_JAVA_OPTIONS
  2. Restart the JobServer.


For a JobServer running on Linux:

Service:
      Edit the /etc/systemd/system/talend-rjs*.service
      Add:
       Environment=_JAVA_OPTIONS=-Duser.timezone=Europe/Berlin
      systemctl daemon-reload
      stop / start jobserver  Manual:
  	Option 1, for all users:
  		Edit /etc/profile (see: https://unix.stackexchange.com/a/151735/239457 )
  	Option 2, for specific user:
  		Edit ~/.bashrc  	Add: _JAVA_OPTIONS='-Duser.timezone=Europe/Vienna'
  	Add: export _JAVA_OPTIONS
  	Log OUT, start a new shell.
  	Start talend jobserver (nohup / screen / etc)


Verify:

After starting the job we will see:

    Starting job hello_world at 11:12 29/01/2020.
    Picked up _JAVA_OPTIONS: -Duser.timezone=Europe/Berlin
    [statistics] connecting to socket on port 3664

 

Labels (2)
Version history
Last update:
‎2024-01-22 09:35 PM
Updated by: