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 %*

1 ACCEPTED SOLUTION

Accepted Solutions
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

5 REPLIES
Twelve Stars TRF
Twelve 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
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 ? 

Twelve Stars TRF
Twelve 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
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.. 

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