Spoon and Carte are using the system's default java, and if that Java is removed or upgraded, Spoon or Carte may stop working. How do I configure the Java I want to use for these 2 processes? How can I change the java settings for them? |
This knowledge article may contain information that does not apply to version 21.05 or later which runs in a container environment. Please refer to Article Number 000385088 for more information about troubleshooting BMC products in containers. Legacy ID:KA397186 Carte - If you are using 7.6.04 system:In the file Carte.bat (located in directory diserver\data-integration) we can see the last line looks like: "%_PENTAHO_JAVA%" %OPT% org.pentaho.di.www.Carte %_cmdline% To setup this "_PENTAHO_JAVA" variable carte.bat makes a call to set-pentaho-env.bat
Below we can see some important content from that file:
rem ---------------------------------------------------------------------------
rem Finds a suitable Java rem rem Looks in well-known locations to find a suitable Java then sets two rem environment variables for use in other bat files. The two environment rem variables are: rem rem * _PENTAHO_JAVA_HOME - absolute path to Java home rem * _PENTAHO_JAVA - absolute path to Java launcher (e.g. java.exe) rem rem The order of the search is as follows: rem rem 1. environment variable PENTAHO_JAVA_HOME - path to Java home rem 2. jre folder at current folder level rem 3. java folder at current folder level rem 4. jre folder one level up rem 5. java folder one level up rem 6. jre folder two levels up rem 7. java folder two levels up rem 8. environment variable JAVA_HOME - path to Java home rem 9. environment variable JRE_HOME - path to Java home rem 10. argument #1 - path to Java home rem rem If a suitable Java is found at one of these locations, then rem _PENTAHO_JAVA_HOME is set to that location and _PENTAHO_JAVA is set to the rem absolute path of the Java launcher at that location. If none of these rem locations are suitable, then _PENTAHO_JAVA_HOME is set to empty string and rem _PENTAHO_JAVA is set to java.exe. rem rem Finally, there is one final optional environment variable: PENTAHO_JAVA. rem If set, this value is used in the construction of _PENTAHO_JAVA. If not rem set, then the value java.exe is used. rem --------------------------------------------------------------------------- So according to this:
rem The order of the search is as follows:
rem rem 1. environment variable PENTAHO_JAVA_HOME - path to Java home So our best solution is to setup this "PENTAHO_JAVA_HOME" environment variable.
After that restart carte and it will start using the java configured.
In the same fashion you can edit the carte.bat file to change the java options. One option we normally want to change is the -Xmx option for maximum heap.
Find he following line:
set OPT=-Xms512M -Xmx1024M -cp %CLASSPATH% -Dorg.mortbay.util.URI.charset=UTF-8 -Djava.library.path=libswt\win32\ -DKETTLE_HOME="%KETTLE_HOME%" -DKETTLE_REPOSITORY="%KETTLE_REPOSITORY%" -DKETTLE_USER="%KETTLE_USER%" -DKETTLE_PASSWORD="%KETTLE_PASSWORD%" -DKETTLE_PLUGIN_PACKAGES="%KETTLE_PLUGIN_PACKAGES%" -DKETTLE_LOG_SIZE_LIMIT="%KETTLE_LOG_SIZE_LIMIT%"
Change the -Xmx to the value desired. We recommend 2048M is you expect to use AI for more than 10000 record of data.
Carte in 8.0 and 8.1 systems:Carte is now run as part of Armonitor process. Edit the line: "C:\Program Files\Java\jre7\bin\java.exe" -Xmx1024m "-Djava.ext.dirs=C:\Program Files\Java\jre7\lib\ext;C:\Program Files\Java\jre7\lib;C:\Program Files\BMC Software\ARSystem\diserver\data-integration;C:\Program Files\BMC Software\ARSystem\diserver\data-integration\lib;C:\Program Files\BMC Software\ARSystem\diserver\data-integration\libext;C:\Program Files\BMC Software\ARSystem\diserver\data-integration\libext\JDBC;C:\Program Files\BMC Software\ARSystem\diserver\data-integration\libext\webservices;C:\Program Files\BMC Software\ARSystem\diserver\data-integration\libext\spring;C:\Program Files\BMC Software\ARSystem\diserver\data-integration\libext\commons;C:\Program Files\BMC Software\ARSystem\diserver\data-integration\libext\web;C:\Program Files\BMC Software\ARSystem\diserver\data-integration\libext\pentaho;C:\Program Files\BMC Software\ARSystem\diserver\data-integration\libext\mondrian;C:\Program Files\BMC Software\ARSystem\diserver\data-integration\libext\salesforce" "-Dorg.mortbay.util.URI.charset=UTF-8" "-DKETTLE_HOME=C:\Program Files\BMC Software\ARSystem\diserver" "-DKETTLE_REPOSITORY=" "-DKETTLE_USER=" "-DKETTLE_PASSWORD=" "-DKETTLE_PLUGIN_PACKAGES=" "-DKETTLE_LOG_SIZE_LIMIT=" "-DKETTLE_MAX_LOG_SIZE_IN_LINES=5000" org.pentaho.di.www.Carte ARSHOST_ALIAS 20000 -i "C:\Program Files\BMC Software\ARSystem" Set the java to whatever path you want to use. In that same line you can also change the java option, like -Xmx parameter. We recommend setting it to 2048M if you expect to process more than 10000 records. Spoon - 7.6.04:You can edit Spoon.bat file. Inside you can find: start javaw %OPT% org.pentaho.di.ui.spoon.Spoon %_cmdline% There you can change the javaw parameter to whatever Java you need. Also you can alter the following line: set OPT=-Xms512M -Xmx1024M -cp %CLASSPATH% -Djava.library.path=libswt\win32\ -DKETTLE_HOME="%KETTLE_HOME%" -DKETTLE_REPOSITORY="%KETTLE_REPOSITORY%" -DKETTLE_USER="%KETTLE_USER%" -DKETTLE_PASSWORD="%KETTLE_PASSWORD%" -DKETTLE_PLUGIN_PACKAGES="%KETTLE_PLUGIN_PACKAGES%" -DKETTLE_LOG_SIZE_LIMIT="%KETTLE_LOG_SIZE_LIMIT%" To change the -Xmx value or any other java parameters you need. Spoon - 8.0 and above:In 8.0 and above Spoon uses the same java configured under the _PENTAHO_JAVA system variable. Otherwise it will use whatever java is in your path first. start "Spoon" "%_PENTAHO_JAVA%" %OPT% -jar launcher\launcher.jar -lib ..\%LIBSPATH% %_cmdline% You can use the variable to set the java to use, or otherwise change the file to set the path directly. If you need to setup the -Xmx then edit the line: if "%PENTAHO_DI_JAVA_OPTIONS%"=="" set PENTAHO_DI_JAVA_OPTIONS="-Xmx512m" "-XX:MaxPermSize=256m" See Also: BEST FAQ on BMC CMDB Suite - Atrium Integrator |