Installing CommandLine as a service - 6.4

Talend Data Services Platform Installation Guide for Windows

EnrichVersion
6.4
EnrichProdName
Talend Data Services Platform
task
Installation and Upgrade
EnrichPlatform
Talend Activity Monitoring Console
Talend Administration Center
Talend Artifact Repository
Talend CommandLine
Talend Data Preparation
Talend Data Stewardship
Talend DQ Portal
Talend ESB
Talend Identity Management
Talend Installer
Talend JobServer
Talend Log Server
Talend Project Audit
Talend Repository Manager
Talend Runtime
Talend SAP RFC Server
Talend Studio

To install CommandLine as a service, proceed as follows:

Configuring JSL

  1. Download the JSL archive from this website.

  2. Unzip it in the directory of your choice.

  3. Go to the bin folder.

  4. If the jsl_static64.ini file does not exist, copy the jsl64.ini file and rename it to jsl_static64.ini.

  5. Copy the jsl_static64.ini and jsl_statif64.exe files at the root of the CommandLine installation directory.

  6. Open the jsl_static64.ini file to edit it.

  7. At the beginning of the file, you can see different names: appname corresponds to the name of your application, servicename corresponds to the name you want to give to the service and displayname corresponds to the name that will be displayed when creating the service.

    If you are not satisfied with those default names, edit the part that is after the = sign according to your needs.

    Under this area, you can see that, by default, the JAVA_HOME environment variable is pointing towards the JRE path.

    [java]
    ;Path to the java runtime used
    ;If this option is not used the default from the registry will be used
    ;jrepath=..\..\..\jdk16
    jrepath=C:\Program Files\Java\jreX.X.X_XX

    This path is set in the [java] part of the .ini file. If the default path is not the path of the installation directory of your application, edit the part that is after the = sign and write this path. In this example, X.X.X_XX refers to the version of Java.

  8. Uncomment the following line to define the type of JVM to be used:

    jvmtype=server

    Next time the service starts, the jvm.dll file located in the <Java_Path>/jre/bin/server directory will be used.

  9. Save your changes and close the file.

Configuring the CommandLine parameters

To configure the CommandLine parameters that are passed to the Java application, you have to edit the last lines of the jsl_static64.ini file which indicate the path to different files (such as configuration files, .jar files and/or java libraries).

  • To do so, edit the parameters as shown below:

    params = 14
    param00 = -Xms64m
    param01 = -Xmx1024m
    param02 = -XX:MaxMetaspaceSize=256m
    param03 = -jar
    param04 = <CommandLinePath>\plugins\org.eclipse.equinox.launcher_X.X.X.vXXXXXXXX.jar
    param05 = -nosplash
    param06 = -application
    param07 = org.talend.commandline.CommandLine
    param08 = -consoleLog
    param09 = -data
    param10 = <CommandLinePath>\commandline-workspace
    param11 = startServer
    param12 = -p
    param13 = 8002

    where <CommandLinePath> refers to the installation directory of the CommandLine application.

    Note

    Note that the first parameter indicated is named "param00" and not "param01", and that the use of quotes is not required around strings holding spaces. Note also that every parameter value of the command line must be indicated in a separate parameter.

Installing the service

  1. Open a CMD window in Administrator mode.

  2. Change the directory to the CommandLine installation directory.

  3. Type in the following command:

    jsl_static64.exe -debug

    This command debugs the CommandLine service. It starts, you can now check that the <CMDLINE_DATA_DIR>\commandline-workspace directory has been created as well.

  4. Stop execution by pressing Ctrl+C.

    The service stops, and the message Exiting is returned.

  5. In the CMD window, type in the following command:

    jsl_static64.exe -install

    The CommandLine service is created and can be viewed by selecting Control Panel > Administrative Tools > Services in the Start Menu of Windows.

    Note that, when shutting down or rebooting Windows, the CommandLine service does not stop. In order to avoid issues during start-up, you need to stop the service before shutting down or rebooting your machine.