Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can we set the java version in batch file which is exported as autonomus job?
Also, If i have java7 and java8 installed, how come changing the compliance level from studio makes the difference in using java version while running the job from console and from studio?
Here is how you can set the versions of Java inside your bat file. It is important to note that the best Java version to use is the JRE that comes with a JDK. This is a weird requirement (and may actually not be essential anymore....but it was, so I always use it) Anyway, your bat file will start like this.....
%~d0 cd %~dp0 java -Xms256M -Xmx4096M -cp .;../lib/routines.jar..........etc
Edit it to point to your JDK's JRE, like this....
%~d0 cd %~dp0 "C:/Program Files/Java/jdk1.8.0_91/jre/bin/java" -Xms256M -Xmx4096M -cp .;../lib/routines.jar..........etc
Note, that I am pointing my my JRE there. You will have to tailor it to your machine's JDK's JRE location.
Hello,
For your question 1, do you want to specify another jvm to start up your talend open studio?
For your question 2, you can set JDK Compliance level in Studio Java Compiler preferences.
Best regards
Sabrina
Thanks for reply.
Yes, I wan't to set specific jvm at the time of running the job from console. Ex, my job is running from Task Scheduler. And I want to use specific jvm. So is there any way to achieve this? like editing of batch file or passing any dos parameter in Tasks scheduler ?
Regarding setting compliance level, I am aware of the option of setting compliance level from studio. But my question is what exact difference it makes when we set the compliance level?
Here is how you can set the versions of Java inside your bat file. It is important to note that the best Java version to use is the JRE that comes with a JDK. This is a weird requirement (and may actually not be essential anymore....but it was, so I always use it) Anyway, your bat file will start like this.....
%~d0 cd %~dp0 java -Xms256M -Xmx4096M -cp .;../lib/routines.jar..........etc
Edit it to point to your JDK's JRE, like this....
%~d0 cd %~dp0 "C:/Program Files/Java/jdk1.8.0_91/jre/bin/java" -Xms256M -Xmx4096M -cp .;../lib/routines.jar..........etc
Note, that I am pointing my my JRE there. You will have to tailor it to your machine's JDK's JRE location.
Thanks a lot.
That's exactly what I wanted.
Though in my case it works with jre as well as jdk