Assuming your motelist script is really in /usr/bin, you need a space
borefe the '-c'  in '/usr/bin/motelist -c'

Kevin

On 9/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm using tinyos-2.x and tinynodes.
>
> I run this piece of code:
>
> Process p = null;
>
>                         System.out.println(">>> OS is " 
> +System.getProperty("os.name"));
>                         if(System.getProperty("os.name").equals("Linux"))
>                         {
>                                 p = Runtime.getRuntime().exec(MOTELISTCMDL);
>                         }
>                         else
>                         {
>                                 p = Runtime.getRuntime().exec(MOTELISTCMDW);
>                         }
>
> Where
>
> public static final String MOTELISTCMDL = "/usr/bin/motelist-c";
> public static final String MOTELISTCMDW ="c:\\cygwin\\bin\\motelist.exe -c";
>
> And I get this:
>
>
> >>> OS is Linux
> java.io.IOException: Cannot run program "/usr/local/bin/motelist-c":
> java.io.IOException: error=2, No such file or directory
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
>         at java.lang.Runtime.exec(Runtime.java:593)
>         at java.lang.Runtime.exec(Runtime.java:431)
>         at java.lang.Runtime.exec(Runtime.java:328)
>         at 
> net.tinyos.icmon.generaldatalogger.MainServer.main(MainServer.java:42)
> Caused by: java.io.IOException: java.io.IOException: error=2, No such file or
> directory
>         at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
>         at java.lang.ProcessImpl.start(ProcessImpl.java:65)
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
>         ... 4 more
>
> I've tried to locate motelist and I've  changed the MOTELISTCMDL value to
> "/usr/bin/motelist-c" but I still got the same error.
>
> Rgds,
> B.
>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>


-- 
~Kevin
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to