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]
-------------------------------------------------------------------------
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

Reply via email to