Hey, I was not talking about repositories, I'm sure you have them.
You need the CLASSPATH environment variable. To see the contents of this variable, you can type the command: echo $CLASSPATH This variable should include a path to either the TinyOS class files or to tinyos.jar. On my system (Mac OS X), the CLASSPATH variable looks like: .:/opt/tinyos-2.x/support/sdk/java Typically, the classpath variable is set in the tinyos.sh script, which should be called automatically from your .bashrc or .profile startup script. I suspect that it is not called on your system, or that your system does not call it with the 'source' command (the source command calls it in the same context as the current shell, thus ensuring that the environment variables are set for the shell and not only for the subprocess of the script). So, check that your CLASSPATH variable is set properly. If it is, you might want to check that the net/tinyos/sf/SerialForwarder.class file is present (maybe you only have the uncompiled source files). If it still does not work, send the CLASSPATH value to the mailing list to see whether anybody can spot a problem with it. If the CLASSPATH variable is not properly set, try the command source /opt/tinyos-2.1.x/tinyos.sh (you might have to substitute the proper path). If it works then, you'll have to check how to automatically call tinyos.sh, otherwise I have no clue about your particular problem. Cheers, Urs Abhishek Phadnis wrote: > hey, > > i just checked the repositories etc and it all seems fine..getting the same > error again..any other ideas? > > 2009/4/29 Urs Hunkeler <[email protected]> > >> Hey Abhishek, >> >> Most likely your classpath is not defined properly. The classpath is >> usually defined in the script in ${TOSROOT}/tinyos.sh. See for instance step >> 4 in the debian installation instructions at: >> >> http://docs.tinyos.net/index.php/Installing_TinyOS_2.1#Two-step_install_on_your_host_OS_with_Debian_packages >> >> Cheers, >> Urs >> >> >> >> Abhishek Phadnis wrote: >> >>> hey everyone >>> >>> i'm trying to invoke serialforwarder using the following command >>> >>> >>> java net.tinyos.sf.SerialForwarder >>> >>> and these are the errors that follow >>> >>> Exception in thread "main" java.lang.NoClassDefFoundError: >>> net/tinyos/sf/SerialForwarder >>> Caused by: java.lang.ClassNotFoundException: net.tinyos.sf.SerialForwarder >>> at java.net.URLClassLoader$1.run(URLClassLoader.java:217) >>> at java.security.AccessController.doPrivileged(Native Method) >>> at java.net.URLClassLoader.findClass(URLClassLoader.java:205) >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:323) >>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:268) >>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336) >>> Could not find the main class: net.tinyos.sf.SerialForwarder. Program will >>> exit >>> >>> >>> could someone please explain whats missing cos i dont have a clue... >>> >>> thanks >>> >>> abhishek >>> > _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
