Exporting a Job script : sh with classpath.jar

One Star

Exporting a Job script : sh with classpath.jar

Hi,
In Talend 4.0 I have a project with some job and sub-jobs. I "export a job script" by right click on the main job (see image).
The shell generated has not the list of library parameters but just "classpath.jar" without ROOT_PATH :
The Shell generated :

cd `dirname $0`
 ROOT_PATH=`pwd`
java -Xms256M -Xmx1024M -cp classpath.jar: talenddemosjava.priortest_0_1.priorTest --context=Default $*

The shell I would wish, with all the libraries explicited :
cd `dirname $0`
 ROOT_PATH=`pwd`
java -Xms256M -Xmx1024M -cp $ROOT_PATH/priortest_0_1.jar:$ROOT_PATH/../lib/systemRoutines.jar:$ROOT_PATH/../lib/userRoutines.jar:$ROOT_PATH/../lib: talenddemosjava.priortest_0_1.priorTest --context=Default $*

(The Talend v6.2 exports this good second shell content. BUT I must stay with v4.0 Smiley Sad )
How could I have all the libraries listed in parameters in the shell file ?
Thank you for any help.
Image : [edit : add the png)
One Star

Re: Exporting a Job script : sh with classpath.jar

During this time I'have continued my search...
In the "Window" menu, "Preferences", "Talend, Import/Export, Shell Setting :
if the command "%GENERATED_TOS_CALL%" is entered twice , like this :
the shell file contains the two texts, one with just classpath.jar , the other one with all the librairies :
cd `dirname $0`
 ROOT_PATH=`pwd`
java -Xms256M -Xmx1024M -cp classpath.jar: talenddemosjava.priortest_0_1.priorTest --context=Default $*
cd `dirname $0`
 ROOT_PATH=`pwd`
 java -Xms256M -Xmx1024M -cp $ROOT_PATH:$ROOT_PATH/../lib/systemRoutines.jar:$ROOT_PATH/../lib/userRoutines.jar::.:$ROOT_PATH/priortest_0_1.jar:$ROOT_PATH/../lib: talenddemosjava.priortest_0_1.priorTest --context=Default $*

I think so it was a bug.
Seventeen Stars

Re: Exporting a Job script : sh with classpath.jar

What about creating the shell scripts for yourself automatically. Every necessary information are present. I would write a small java program which reads the current shell script and and scans all jars in the folders and create a new one.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now