Java Build Engine environment variables
Hello...
(I can't get a less than or greater than sign to show up in my code samples, so know that ~ means less than and /~ is /greaterthan) We are attempting to set up a build for our Visual Studio project. The build engine service described below is running on a Windows XP machine. We have a build engine service running with the following command: C:\Builds\v12\JavaServiceLauncher\bin\jsl.exe The service is running under a domain user account. If we log into the XP machine, and start a command prompt, the PATH environment variable contains about a dozen paths, including c:\windows\system32 as expected. We call msbuild.exe project.msproj. One of the targets calls an exec task:
The resulting log says that "'xcopy' is not recognized as an internal or external command, operable program or batch file." If we use
the build successfully completes. We changed the command of our build definition to simply execute cmd /c PATH. The results of that build showed that, at the time of execution of the command, the path environment variable is: PATH=C:\JAVA\TEST How do we get the PATH environment variable to retain its value under the context of jsl.exe? |
3 answers
The problem is that a program launched as a Windows service does not run under the normal shell, and so it does not have the usual path set.
The release notes for the latest version of Java Service Launcher state:
(via http://jslwin.sourceforge.net/changelog.html) So you could try setting the PATH in the .ini file. If that doesn't work, you could configure the build to run a batch script that sets up the path, then invokes the Ant script. Regards, Nick Edgar RTC Build component lead |
> I can't get a less than or greater than sign to show up in my code samples
Try checking 'Disable HTML in this post'. If HTML is enabled, it thinks <> chars are HTML tag delimiters. Another option is to use &lt; and &gt;. |
That works.
Setting the PATH variable in the section of jsl.ini does the job. We also have export=CLASSPATH,PATH but I'm not sure whether that is necessary or not. We do not have the PATH variable set under the section of the jsl.ini. Thanks for your help! |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.