Setting classpath during Run/Advanced Settings

One Star

Setting classpath during Run/Advanced Settings

Hello,
I am attempting to set the classpath on the Run  Job/Advanced Settings screen. But Talend cannot recognize the command.
Here is my argument
-cp"C:\MyDirectory\Components".
1) Talend constantly removes the space between the -cp and the directory.
Anyone can suggest how to set the Argument for the classpath?
Moderator

Re: Setting classpath during Run/Advanced Settings

Hi,
Do you want to set classpath in Run/Advanced settings for installing custom component? What does your job requirement look like?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Setting classpath during Run/Advanced Settings

Hi Xdshi. Thanks for responding. That is correct. Inside of the Run Job, I have a component that runs an external JAR (already included). The first thing this JAR does is it 
looks for a configuration file in the classpath directory specified. 
I get the following errors with the options I tried below :
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: 
-cp:C:\MyDirectory\Components
-cp:"C:\MyDirectory\Components"
-XX:cp="C:\MyDirectory\Components"
Moderator

Re: Setting classpath during Run/Advanced Settings

Hi,
Have you already checked document about:TalendHelpCenter:Installing a custom component?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Setting classpath during Run/Advanced Settings

Hi Xdshi,
Yes I have. Nothing related to setting classpath. I may have found a possible solution but need an expert  to verify. In File/Edit Project Properties/Build/Shell/BAT, there is a entry stating the following where %NXCAS_CP% was entered by myself:
%~d0
cd %~dp0
java ${talend.job.jvmargs} -cp %NXCAS_CP% ${talend.job.bat.classpath} ${talend.job.class} ${talend.job.bat.addition} %*
How do I configure this so this system variable is always entered in the build path.
Thanks.
Max 
Moderator

Re: Setting classpath during Run/Advanced Settings

Hi Max, 
We will make an investigation on your issue then come back to you as soon as we can.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.