I'm trying to get Jenkins work on Windows machine. For testing purpose I've installed Jenkins on my localhost. Java_home
and path
are pointing to java 14(Extracted from zip). I had jre7 and jre 8 installed on my machine so removed them to get rid of the classpath errors i had earlier. I had to manually delete java.exe javaw.exe from the system32 folder.
I run ant build from command prompt, it works without any issues. Now I build the same project in Jenkins which is also on the same machine, i get the following exception.
Where do I specify the Java version within Jenkins so it starts using the JAVA_HOME and Path?
[CommonUtilities] $ cmd.exe /C '"ant.bat -file exported_build.xml build && exit %%ERRORLEVEL%%"'
Error: could not open `C:\Program Files (x86)\Java\jre7\lib\i386\jvm.cfg'
Build step 'Invoke Ant' marked build as failure
Finished: FAILURE
Update:
>echo %JAVA_HOME%
C:\tools\bea\jdk142_19
>echo %PATH%
C:\TDS\Ora\product\11.2.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS
\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\W
indowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\tools\bea\jdk142_08\b
in;C:\tools\Build\ant\apache-ant-1.8.2\bin;