Hi Michael & Others too ..
Continuing with the same problem .. today one (very simple) idea came to my
mind ..
As i want to run a java application (Serial Forwarder) though another java
app (my application) why m i using all stuff like runtime , cygwin n all..
I could simply call main method of serial forwarder like this ..
String[] args = {"-comm","-ser...@com16:telosb"};
try{
net.tinyos.sf.SerialForwarder sff = new net.tinyos.sf.SerialFrowarder(args);
}catch(...){
..
}
i was hoping this should run .. but i got this error message.. (actually
.. sf window pop up for few milliseconds and all application crashed with
this error. )
/**********************************************************/
The toscomm JNI library was not found.
Check that your tinyos-tools package is installed and try
rerunning tos-install-jni.
Aborting.
/**********************************************************/
this error i did not encountered previously ..
i tried this .. but ..
/**********************************************************/
$ tos-install-jni
Installing 32-bit Java JNI code in /cygdrive/d/Program
Files/Java/jdk1.6.0_14/jr
e/bin ...
install: cannot stat `/usr/lib/tinyos/*-32.dll': No such file or directory
/**********************************************************/
m i again mistaking with CLASSPATH , PATH or anything else ?
Thanks a lot for your help ..
Himanshu Barve
On 26 March 2010 22:13, Michael Schippling <[email protected]> wrote:
> I don't know about running external programs from within Java...
> my few paltry attempts have failed and I simply rejected the
> notion and worked around it with shell programming...
>
> All "modern" operating systems that I know have a command line
> shell facility to execute programs, and they all have an envvar
> interface of some kind...heck even MSDOS...
>
> You only need cygwin on Windows to do TOS compiles. You should
> be able to run TOS Java programs from the Windows Command shell
> after setting the right PATH, CLASSPATH, and MOTECOM. The TOS
> programs may need a sense of current directory as well, which
> could be lacking when run in non-shell environments.
>
> I have successfully deployed PC side code for TOS systems under
> just the Windows shell by installing the right Java JRE and other
> components I listed in my original reply. (By reverse engineering
> the TOS make output) I even extracted the relevant download
> utilities (for telosb) so I could send updates for my client to
> install.
>
> MS
>
>
> himanshu barve wrote:
>
>> I was trying the same thing as given in previous mails .. When i start
>> Serial Forwarder directly from cigwin (by entering manual command .) And
>> then execute my application which work on data packets provided by
>> SerialForwarder and mig generated message structure class , All things work
>> properly .
>> But now i have to create a independent (from cigwin) application , where
>> user need not to know background cigwin commands . I want Serial forwarder
>> to be started from my same java application .. So i used
>> "Runtime.getRuntime().exec( "java net.tinyos.sf.SerialForwarder -comm
>> ser...@com16:telosb");"
>> which is the same command we give from cigwin . At present lets assume
>> that MOTECOM variable remain the same for all operations. But this is not
>> helping .. It is not giving any error but its not even starting SF. What
>> should i do ? any idea ?
>> Also .. MIchael as u said in ur last mail , just by fetching tinyos.jar
>> will solve all the problem n cygwin will not be needed. i dont think so .
>> If cygwin is not present how can we start serialforwarder. i mean all this
>> program are written in linux environment . (this is what all i think.
>> correct me if i am wrong.)
>>
>> Thanks a lot ..
>>
>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>> On 19 March 2010 22:13, Michael Schippling <[email protected] <mailto:
>> [email protected]>> wrote:
>>
>> To my knowledge Eclipse doesn't add any internal code to
>> your project, so what you see is what you get as far as
>> your application goes. You do need to make sure that you
>> have the tinyos.jar, whatever Java Comm you are using,
>> the same or similar JRE, and appropriate USB drivers
>> installed on your target system. You don't actually
>> need cygwin on a runtime-only target.
>>
>> MS
>>
>> himanshu barve wrote:
>>
>> Hello Friends .. I have a small doubt (Its still doubt because i
>> have not got any errors yet)
>> I am using eclipse to create a java application. THis java
>> appication has one package based on serial forwarder Received
>> data . Now i am using eclipse in Win Vista. I have copied
>> tinyos.jar and added to external JAR used by eclipse. I wrote a
>> program which without any error . Now my question is , when i
>> create a JAR from above Eclipse IDE. Put that in another system
>> where cygwin is present and that particular package based on
>> serial forwarder was working separately .. , will this work ??
>> If not what is the solution ?? Anybody has any experience with
>> that ? Please help me .. i am near my deadline of project..
>> -- With Best Regards
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> _______________________________________________
>> Tinyos-help mailing list
>> [email protected]
>> <mailto:[email protected]>
>>
>>
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>>
>>
>>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help