Hello! Yes, and to my surprise it still got the value ".", nothing more. If I removed the ";" then I got the rest, but I had to change the "\" to "/". I have also tried singel qoutas (') /Fredrik
There's only a difference between .bat and .cmd if they're launched through a shortcut (.bat will use the old command.com, while .cmd will use cmd.exe, meaning it has more capabilities). However, when launched directly, cmd.exe should be used anyway.
Perhaps the problem is that the .bat-file doesn't re-quote the value when it's using it, causing the "target" to not know they're supposed to be there? Or did you check it by actually echoing it out?
I tried your script, bertelbrander. And that one works fine. I guess I might not have give you guys the complete image of the problem. The bat file is called from a ant script that gets the value from a properties like:
build.properties: REM CLASSPATH=.;lib\myjar1.jar;lib\myjar2.jar REM CLASSPATH=\".;lib\myjar1.jar;lib\myjar2.jar\" CLASSPATH='.;lib\myjar1.jar;lib\myjar2.jar'
I think I solved it with all your help: (double quotas in build.properties) CLASSPATH=".;lib\myjar1.jar;lib\myjar2.jar"
(single quotas around variables that qontains double quotas in build.xml) <arg line="/c mybat.bat param1 param2 '${CLASSPATH}'"/>
(double quotas around param and tilde to omit the surrounding double qoutas as bertelbrender said, in the maybat.bat) set CLASSPATH="%~9" echo %CLASSPATH%
Thank you all for your help!!!
Please all of you, give a svar so I can reward you!
Ok bertelbrander I take your word for it. I hope you belive me when I said that I am most thankful for your help.
Thank you booth very much!
Best regards Fredrik
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.