Greetings,
Try doing following, it worked for me.

1. Comment out the CLASSPATH line from your .bashrc file (if at all you've
might have put it there. otherwise _un_export_ that variable in cygwin).
2. Set classpath varible in your Windows environment variable.

Steps to do that,
1. Right click on MyComputer and click Properties
2. Click on Advanced tab
3. Click on Environment Variables
4. System Variables segment, try to find CLASSPATH

If there is CLASSPATH variable,

4.1 Click Edit, and add following line,

;C:\cygwin\opt\tinyos-2.x\support\sdk\java
Click ok, ok, ok

Else,

4.1 Click New,
4.2 In the Name, enter CLASSPATH
4.3 In the value, enter "C:\cygwin\opt\tinyos-2.x\support\sdk\java"
4.4 Click Ok ,ok , ok

5. Restart Cygwin
6. type "echo $CLASSPATH"

You should line that u entered in 4.3, among others, if any.


7. Run your program, and hopefully it should work.


NOTE: As a precautionary measure, you may wanna make sure you use both
"java" and "javac" programs from your Windows installation directory, not
one of those found on "/usr/bin/".

My setup looks like following,

$echo $CLASSPATH

.;C:\cygwin\opt\tinyos-2.x\support\sdk\java;C:\Program
Files\Java\jdk1.6.0_10\bin;C:\Program Files\Java\jre6\lib\ext\QTJava.zip


$ which javac

/usr/bin/javac

$ ls -l /usr/bin/javac

 /usr/bin/javac -> /cygdrive/c/Program Files/Java/jdk1.6.0_10/bin/javac.exe

$ which java

/cygdrive/c/WINDOWS/system32/java


$ ls -l java

/cygdrive/c/WINDOWS/system32/java -> /cygdrive/c/Program
Files/Java/jdk1.6.0_10/bin/java.exe



Hope it helps!!


Thanks,JD
---------------------------
Love All, Serve All
----------------------------


On Fri, Nov 28, 2008 at 6:18 AM, Michael Schippling <[EMAIL PROTECTED]>wrote:

> have a look at this:
>     http://docs.tinyos.net/index.php/Java_cygwin
> and search this list for "CLASSPATH" advice.
> MS
>
>
> ivi610 wrote:
> > Hi
> > i already tried to do this but i can't compile, there are plenty of
> > errors at compile time.
> > I put the errors in the file tmp.txt attached to this mail.
> > Thanks for the help
> >
> > ##################################################################
> >
> >
> > Cyril
> >
> >
> > ------------------------------------------------------------------------
> > *De :* Mehmet Akif Antepli <[EMAIL PROTECTED]>
> > *À :* ivi610 <[EMAIL PROTECTED]>
> > *Cc :* tinyos help <[email protected]>
> > *Envoyé le :* Vendredi, 28 Novembre 2008, 9h41mn 20s
> > *Objet :* Re: [Tinyos-help] java issues tinyos.jar
> >
> > Hi,
> >
> > Try opening a console under /opt/tinyos-2.1.0/support/sdk/java and
> > type 'make' command. After that try to build the Oscilloscope
> application.
> >
> > Akif
> >
> > On Fri, Nov 28, 2008 at 10:35 AM, ivi610 <[EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]>> wrote:
> >  > Hello
> >  > i have installed tinyos 2.1 but have some issues whith tinyos.jar.
> >  > I tried to compile Oscilloscope application but it fails.
> >  > I also tried to compile tinyos.jar with "make tinyos.jar" but fails
> also.
> >  > Any idea?
> >  > Thanks
> >  >
> >
> ##########################################################################"
> >  > [EMAIL PROTECTED]
> >  > /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/apps/Oscilloscope/ja
> >  > va
> >  > $ make
> >  > javac *.java
> >  > Oscilloscope.java:11: package net.tinyos.message does not exist
> >  > import net.tinyos.message.*;
> >  > ^
> >  > Oscilloscope.java:12: package net.tinyos.util does not exist
> >  > import net.tinyos.util.*;
> >  > ^
> >  > Oscilloscope.java:36: cannot find symbol
> >  > symbol: class MessageListener
> >  > public class Oscilloscope implements MessageListener
> >  >                                      ^
> >  > Oscilloscope.java:38: cannot find symbol
> >  > symbol  : class MoteIF
> >  > location: class Oscilloscope
> >  >    MoteIF mote;
> >  >    ^
> >  > Oscilloscope.java:66: cannot find symbol
> >  > symbol  : class Message
> >  > location: class Oscilloscope
> >  >            Message msg) {
> >  >            ^
> >  > OscilloscopeMsg.java:7: package net.tinyos.message does not exist
> >  > public class OscilloscopeMsg extends net.tinyos.message.Message {
> >  >                                                        ^
> >  > OscilloscopeMsg.java:67: package net.tinyos.message does not exist
> >  >    public OscilloscopeMsg(net.tinyos.message.Message msg, int
> > base_offset)
> >  > {
> >  >                                              ^
> >  > OscilloscopeMsg.java:76: package net.tinyos.message does not exist
> >  >    public OscilloscopeMsg(net.tinyos.message.Message msg, int
> > base_offset,
> >  > int
> >  > data_length) {
> >  >                                              ^
> >  > Oscilloscope.java:55: cannot find symbol
> >  > symbol  : class MoteIF
> >  > location: class Oscilloscope
> >  >    mote = new MoteIF(PrintStreamMessenger.err);
> >  >                ^
> >  > Oscilloscope.java:55: cannot find symbol
> >  > symbol  : variable PrintStreamMessenger
> >  > location: class Oscilloscope
> >  >    mote = new MoteIF(PrintStreamMessenger.err);
> >  >                      ^
> >  > Oscilloscope.java:114: cannot find symbol
> >  > symbol  : variable MoteIF
> >  > location: class Oscilloscope
> >  >        mote.send(MoteIF.TOS_BCAST_ADDR, omsg);
> >  >                  ^
> >  > OscilloscopeMsg.java:18: cannot find symbol
> >  > symbol  : method amTypeSet(int)
> >  > location: class OscilloscopeMsg
> >  >        amTypeSet(AM_TYPE);
> >  >        ^
> >  > OscilloscopeMsg.java:24: cannot find symbol
> >  > symbol  : method amTypeSet(int)
> >  > location: class OscilloscopeMsg
> >  >        amTypeSet(AM_TYPE);
> >  >        ^
> >  > OscilloscopeMsg.java:33: cannot find symbol
> >  > symbol  : method amTypeSet(int)
> >  > location: class OscilloscopeMsg
> >  >        amTypeSet(AM_TYPE);
> >  >        ^
> >  > OscilloscopeMsg.java:42: cannot find symbol
> >  > symbol  : method amTypeSet(int)
> >  > location: class OscilloscopeMsg
> >  >        amTypeSet(AM_TYPE);
> >  >        ^
> >  > OscilloscopeMsg.java:51: cannot find symbol
> >  > symbol  : method amTypeSet(int)
> >  > location: class OscilloscopeMsg
> >  >        amTypeSet(AM_TYPE);
> >  >        ^
> >  > OscilloscopeMsg.java:60: cannot find symbol
> >  > symbol  : method amTypeSet(int)
> >  > location: class OscilloscopeMsg
> >  >        amTypeSet(AM_TYPE);
> >  >        ^
> >  > OscilloscopeMsg.java:69: cannot find symbol
> >  > symbol  : method amTypeSet(int)
> >  > location: class OscilloscopeMsg
> >  >        amTypeSet(AM_TYPE);
> >  >        ^
> >  > OscilloscopeMsg.java:78: cannot find symbol
> >  > symbol  : method amTypeSet(int)
> >  > location: class OscilloscopeMsg
> >  >        amTypeSet(AM_TYPE);
> >  >        ^
> >  > OscilloscopeMsg.java:150: cannot find symbol
> >  > symbol  : method getUIntBEElement(int,int)
> >  > location: class OscilloscopeMsg
> >  >        return (int)getUIntBEElement(offsetBits_version(), 16);
> >  >                    ^
> >  > OscilloscopeMsg.java:157: cannot find symbol
> >  > symbol  : method setUIntBEElement(int,int,int)
> >  > location: class OscilloscopeMsg
> >  >        setUIntBEElement(offsetBits_version(), 16, value);
> >  >        ^
> >  > OscilloscopeMsg.java:213: cannot find symbol
> >  > symbol  : method getUIntBEElement(int,int)
> >  > location: class OscilloscopeMsg
> >  >        return (int)getUIntBEElement(offsetBits_interval(), 16);
> >  >                    ^
> >  > OscilloscopeMsg.java:220: cannot find symbol
> >  > symbol  : method setUIntBEElement(int,int,int)
> >  > location: class OscilloscopeMsg
> >  >        setUIntBEElement(offsetBits_interval(), 16, value);
> >  >        ^
> >  > OscilloscopeMsg.java:276: cannot find symbol
> >  > symbol  : method getUIntBEElement(int,int)
> >  > location: class OscilloscopeMsg
> >  >        return (int)getUIntBEElement(offsetBits_id(), 16);
> >  >                    ^
> >  > OscilloscopeMsg.java:283: cannot find symbol
> >  > symbol  : method setUIntBEElement(int,int,int)
> >  > location: class OscilloscopeMsg
> >  >        setUIntBEElement(offsetBits_id(), 16, value);
> >  >        ^
> >  > OscilloscopeMsg.java:339: cannot find symbol
> >  > symbol  : method getUIntBEElement(int,int)
> >  > location: class OscilloscopeMsg
> >  >        return (int)getUIntBEElement(offsetBits_count(), 16);
> >  >                    ^
> >  > OscilloscopeMsg.java:346: cannot find symbol
> >  > symbol  : method setUIntBEElement(int,int,int)
> >  > location: class OscilloscopeMsg
> >  >        setUIntBEElement(offsetBits_count(), 16, value);
> >  >        ^
> >  > OscilloscopeMsg.java:428: cannot find symbol
> >  > symbol  : method getUIntBEElement(int,int)
> >  > location: class OscilloscopeMsg
> >  >        return (int)getUIntBEElement(offsetBits_readings(index1), 16);
> >  >                    ^
> >  > OscilloscopeMsg.java:435: cannot find symbol
> >  > symbol  : method setUIntBEElement(int,int,int)
> >  > location: class OscilloscopeMsg
> >  >        setUIntBEElement(offsetBits_readings(index1), 16, value);
> >  >        ^
> >  > Note: Window.java uses unchecked or unsafe operations.
> >  > Note: Recompile with -Xlint:unchecked for details.
> >  > 29 errors
> >  > make: *** [Oscilloscope.class] Error 1
> >  >
> >
> ##########################################################################
> >  > [EMAIL PROTECTED]
> >  > /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/apps/Oscilloscope/ja
> >  > va
> >  > $ echo $CLASSPATH
> >  > /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/tinyos.jar:.
> >  >
> >  > [EMAIL PROTECTED]
> >  > /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/apps/Oscilloscope/ja
> >  > va
> >  > $ tos-locate-jre --java
> >  > /cygdrive/c/Program Files/Java/jdk1.6.0_10/bin
> >  >
> >  > [EMAIL PROTECTED]
> >  > /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/apps/Oscilloscope/ja
> >  > va
> >  > $ tos-locate-jre --javac
> >  > /cygdrive/c/Program Files/Java/jdk1.6.0_10/bin
> >  >
> >  > [EMAIL PROTECTED]
> >  > /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/apps/Oscilloscope/ja
> >  > va
> >  > $ tos-locate-jre --jni
> >  > /cygdrive/c/Program Files/Java/jdk1.6.0_10/jre/bin
> >  >
> >  > [EMAIL PROTECTED]
> >  > /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/apps/Oscilloscope/ja
> >  > va
> >  > $ tos-install-jni
> >  > Installing 32-bit Java JNI code in /cygdrive/c/Program
> >  > Files/Java/jdk1.6.0_10/jr
> >  > e/bin ...
> >  > done.
> >  > ####################################################################
> >  >
> >  > Cyril
> >  >
> >  >
> >  > _______________________________________________
> >  > Tinyos-help mailing list
> >  > [email protected]
> > <mailto:[email protected]>
> >  >
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >  >
> >
> >
> > ------------------------------------------------------------------------
> >
> > ... /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java
> > make[1]: Entering directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net'
> > ... /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net
> > make[2]: Entering directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos'
> > ... /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos
> > make[3]: Entering directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/packet'
> > ...
> /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/packet
> > ncg -o Serial.java -java-classname=net.tinyos.packet.Serial java
> /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/tos/lib/serial/Serial.h Serial.h
> > javac Serial.java
> > javac AbstractSource.java
> > make[3]: Leaving directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/packet'
> > make[3]: Entering directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/message'
> > ...
> /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/message
> > mig -o SerialPacket.java -java-classname=net.tinyos.message.SerialPacket
> java /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/tos/lib/serial/Serial.h
> serial_packet -I/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/tos/types
> > javac SerialPacket.java
> > make[3]: Leaving directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/message'
> > make[3]: Entering directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/sf'
> > ...
> /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/sf
> > javac SFClient.java
> > make[3]: Leaving directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/sf'
> > make[3]: Entering directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/comm'
> > ...
> /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/comm
> > javac NativeSerial.java
> > make[3]: Leaving directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/comm'
> > make[3]: Entering directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/mviz'
> > ...
> /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/mviz
> > javac DDocument.java
> > make[3]: Leaving directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/mviz'
> > make[3]: Entering directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/sim'
> > ...
> /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/sim
> > make[3]: Leaving directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/sim'
> > make[3]: Entering directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/tools'
> > ...
> /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/tools
> > mig java  -java-classname=net.tinyos.tools.PrintfMsg
> /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/tos/lib/printf/printf.h printf_msg
> -o PrintfMsg.java
> > javac PrintfMsg.java
> > make[3]: Leaving directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/tools'
> > make[3]: Entering directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/util'
> > ...
> /cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/util
> > javac DiagMsg.java
> > make[3]: Leaving directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/util'
> > make[2]: Leaving directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos'
> > make[1]: Leaving directory
> `/cygdrive/c/tinyos/cygwin/opt/tinyos-2.x/support/sdk/java/net'
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Tinyos-help mailing list
> > [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
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to