Hi Subodh,
First, this is not a version compatibility issue. And following is my
informal explanation (as I'm not one of the STAF development team):
Spaces in the path won't cause problems as long as the path is still no
harmful to the command's format ( a word will be harmful if it is one of the
PROCESS Start command's keywords, e.g. WorkDir, Var, Wait, UserName, ...etc)
as the parser will think of that word (and words following it till the next
keyword) as a new parameters for the command.
Anyway, the safest (and most consistent) way is to use CLC (Colon Length
Colon) format for any path, as described
here<http://staf.sourceforge.net/current/STAFUG.htm#HDROVFORM>
.
Hope this helps and is correct
2008/9/7 <[EMAIL PROTECTED]>
> Hi Ahmed,
> Thanks for the solution. I also tried the same thing and it worked for me.
> But there is some amount of inconsistency in the behavior which I would like
> to highlight here:
> Is it possible that if double-quotes are NOT provided around the file name
> ("C:\test.java") it will NOT work? OR is it that providing double-quotes
> around the file name is mandatory (even if the file name doesn't contain any
> blank spaces)
>
> Because I have observed the following on 2 different machines running staf:
> 1. If you don't provide double-quotes it will throw a staf error. Also, it
> will work sometimes (in one of the machine I
> saw it working without specifying the quotes)
> 2. Even with double-quotes provided it is not working on one other machine
> running staf.
>
> My question is how is it possible that the same command works on one
> machine but doesn't work on the other running exactly same versions of staf.
>
> Thanks & Regards
> Subodh
> ------------------------------
> *From:* Ahmed Mostafa [mailto:[EMAIL PROTECTED]
> *Sent:* Fri 9/5/2008 2:54 PM
> *To:* Subodh Soni (WT01 - Computing and Storage IPG)
> *Cc:* staf-users@lists.sourceforge.net
> *Subject:* Re: [staf-users] Compiling java program through STAF
>
> Hi Subodh,
> I tried your command, I had the following error only and I corrected it,
> and everything is OK.
>
> test.java is not in the current path, so it is not found, this produced the
> following message in the shell where STAFProc is started:
> javac: file not found: test.java
> resolution is by changing the current directory where javac executes, by
> either:
>
> - changing the current directory to that location, OR
> - executing staf local PROCESS Start Shell Command cd Parms "C:\some
> path" before executing your request, OR
> - (preferred solution, for its generality) executing the command as: staf
> local PROCESS Start Shell Command javac Parms test.java WorkDir "C:\some
> path" Wait ReturnStdOut
>
> Assuming you want to compile the file: C:\some path\ test.java
>
> Hope this helps
>
> 2008/9/5 Subodh Soni <[EMAIL PROTECTED]>
>
>> Hi,
>>
>> I am trying to compile a java program using STAF command as follows:
>>
>>
>>
>> *C:\staf local process start shell command javac test.java wait
>> returnstdout*
>>
>>
>>
>> I get the following response from STAF:
>>
>>
>>
>> Response
>>
>> ---------------
>>
>> {
>>
>> Return Code: 1
>>
>> Key : <None>
>>
>> Files : [
>>
>> {
>>
>> Return Code: 0
>>
>> Data :
>>
>> }
>>
>> ]
>>
>> }
>>
>> The above output means that my program is not compiled successfully. In
>> addition, I verify that by checking if test.class is created in my current
>> working directory, but it is not present.
>>
>>
>>
>> NOTE: Trying manually on the command prompt on Windows works fine i.e. if
>> I give "javac test.java" it creates the test.class file without any issues,
>> but through STAF, it does not seem to work.
>>
>>
>>
>> What am I doing wrong here? Please help me in this regard, as I cannot
>> proceed further in my task without this basic thing working.
>>
>>
>>
>> Thanks & Regards
>>
>> Subodh
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> staf-users mailing list
>> staf-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/staf-users
>>
>>
>
>
> --
> Ahmed Mostafa
> Software Specialist
> IBM Egypt, Cairo Technology Development Center
> 0123919750
> [EMAIL PROTECTED]
>
> * Please do not print this email unless it is absolutely necessary. *
>
> The information contained in this electronic message and any attachments to
> this message are intended for the exclusive use of the addressee(s) and may
> contain proprietary, confidential or privileged information. If you are not
> the intended recipient, you should not disseminate, distribute or copy this
> e-mail. Please notify the sender immediately and destroy all copies of this
> message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>
--
Ahmed Mostafa
Software Specialist
IBM Egypt, Cairo Technology Development Center
0123919750
[EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users