Talend run builded job different java path

Highlighted
Five Stars

Talend run builded job different java path

Hi developing simple job and exported. Moved an other pc (Owned old java version) dont work. Java version not update because some program only work this version. How to work my job portable..

 

Orginal:

%~d0
cd %~dp0
 java -Xms256M -Xmx1024M -cp .;../lib/routines.jar;../lib/commons-collections-3.2.2.jar;../lib/geronimo-stax-api_1.0_spec-1.0.1.jar;../lib/log4j-1.2.15.jar;../lib/log4j-1.2.16.jar;../lib/xmlbeans-2.6.0.jar;../lib/dom4j-1.6.1.jar;../lib/poi-ooxml-schemas-3.11-20141221.jar;../lib/poi-ooxml-3.11-20141221_modified_talend.jar;../lib/talendcsv.jar;../lib/poi-3.11-20141221_modified_talend.jar;../lib/advancedPersistentLookupLib-1.0.jar;../lib/poi-scratchpad-3.11-20141221.jar;excelparser1_0_1.jar; local_project.excelparser1_0_1.ExcelParser1 --context=Default %*

 

Imagine:

 

%~d0
cd %~dp0
<!{MY_JAVA_PATH}!> java -Xms256M -Xmx1024M -cp .;../lib/routines.jar;../lib/commons-collections-3.2.2.jar;../lib/geronimo-stax-api_1.0_spec-1.0.1.jar;../lib/log4j-1.2.15.jar;../lib/log4j-1.2.16.jar;../lib/xmlbeans-2.6.0.jar;../lib/dom4j-1.6.1.jar;../lib/poi-ooxml-schemas-3.11-20141221.jar;../lib/poi-ooxml-3.11-20141221_modified_talend.jar;../lib/talendcsv.jar;../lib/poi-3.11-20141221_modified_talend.jar;../lib/advancedPersistentLookupLib-1.0.jar;../lib/poi-scratchpad-3.11-20141221.jar;excelparser1_0_1.jar; local_project.excelparser1_0_1.ExcelParser1 --context=Default %*


Accepted Solutions
Highlighted
Five Stars

Re: Talend run builded job different java path

C:\MyJava\j2re1.4.2_04\bin\javaw.exe -Xms256M -Xmx1024M -cp .;../lib/routines.jar;../lib/commons-collections-3.2.2.jar;../lib/geronimo-stax-api_1.0_spec-1.0.1.jar;../lib/log4j-1.2.15.jar;../lib/log4j-1.2.16.jar;../lib/xmlbeans-2.6.0.jar;../lib/dom4j-1.6.1.jar;../lib/poi-ooxml-schemas-3.11-20141221.jar;../lib/poi-ooxml-3.11-20141221_modified_talend.jar;../lib/talendcsv.jar;../lib/poi-3.11-20141221_modified_talend.jar;../lib/advancedPersistentLookupLib-1.0.jar;../lib/poi-scratchpad-3.11-20141221.jar;excelparser1_0_1.jar; local_project.excelparser1_0_1.ExcelParser1 --context=Default %*

 

Its'a solution! And @TRF thanx sport try Smiley Happy

View solution in original post


All Replies
Highlighted
Sixteen Stars
Sixteen Stars

Re: Talend run builded job different java path

This question relates to Java reverse compatibility. Searching to Java in an other place is not enough to solve the case. However, can you share versions you want to use?

TRF
Highlighted
Five Stars

Re: Talend run builded job different java path

System java version doesn't matter because ibm cognos use that java. This java is modifed and i dont install different certificate later job example (SSL webservice). We must use jre portable not save windows environment variables.

Can chance .bat file environment variables ? 

Highlighted
Sixteen Stars
Sixteen Stars

Re: Talend run builded job different java path

You can do what you want with the .bat but I don't think this is enough because of compatibility between (unknown) Java versions.


TRF
Highlighted
Five Stars

Re: Talend run builded job different java path

My portable java version is "1.8.0_121" and ibm cognos java version is "1.8.0_121"

same java version but.My java keystore/cacerts file (SSL certificate) broke ibm cognos web page. We need one machine two java jre and my java dont use windows environment variables.. 

Highlighted
Five Stars

Re: Talend run builded job different java path

C:\MyJava\j2re1.4.2_04\bin\javaw.exe -Xms256M -Xmx1024M -cp .;../lib/routines.jar;../lib/commons-collections-3.2.2.jar;../lib/geronimo-stax-api_1.0_spec-1.0.1.jar;../lib/log4j-1.2.15.jar;../lib/log4j-1.2.16.jar;../lib/xmlbeans-2.6.0.jar;../lib/dom4j-1.6.1.jar;../lib/poi-ooxml-schemas-3.11-20141221.jar;../lib/poi-ooxml-3.11-20141221_modified_talend.jar;../lib/talendcsv.jar;../lib/poi-3.11-20141221_modified_talend.jar;../lib/advancedPersistentLookupLib-1.0.jar;../lib/poi-scratchpad-3.11-20141221.jar;excelparser1_0_1.jar; local_project.excelparser1_0_1.ExcelParser1 --context=Default %*

 

Its'a solution! And @TRF thanx sport try Smiley Happy

View solution in original post

2019 GARTNER 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

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog