<RANT>
The problem is that the guys who designed Java made it easy to
supersede interfaces and code that (someone thinks) were poorly
designed to start with. The further problem is that they never
deprecate the really egregious examples because everyone depends
on them. Also I have never seen deprecated code actually removed,
because that would break the (misguided?) attempt at guaranteed
backward compatibility...
</RANT>
Don't worry, it's just a warning that someone thought of a better
way to do something and didn't want to go back and fix everything.
You should have a valid class file in the same directory as the src.
Full speed ahead!
MS
Milton Aguiar wrote:
After doing what you have said, the following error occurs:
[EMAIL PROTECTED] /opt/tinyos-1.x/tools/java/net/tinyos/matlab
$ javac MatlabClock.java
Note: MatlabClock.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
What's the problem now?
Thanks
Milton Aguiar
Michael Schippling escreveu:
You probably don't have your CLASSPATH set right yet/still...
The errors you show are due to not being able to find the TOS tools
packages.
Try this:
export
CLASSPATH=".;C:/tinyos/cygwin/opt/tinyos-1.x/tools/java;[matlab]"
cd C:/tinyos/cygwin/opt/tinyos-1.x/tools/java/net/tinyos/matlab
javac MatlabClock.java [...etc]
where [matlab] is the path and name to the Matlab jar file that contains
"com.mathworks.jmi.*".
You might say, I'm in that directory already, but java doesn't have a
default search path for classes, other than the contents of .../jre/lib.
It's also a good idea to include the current dir "." in your CLASSPATH,
otherwise java will refuse to see files right in front of it's nose...
Again I just advised someone to: google CLASSPATH and read up a bit.
It's analogous to LD_LIBRARY_PATH, but needs to be set at compile time
too.
MS
Milton Aguiar wrote:
Hi all:
Now when i try to compile the TinyOS Matlab tools in
C:\tinyos\cygwin\opt\tinyos-1.x\tools\java\net\tinyos\matlab the
following errors occurs:
$ make matlab
javac MatlabClock.java MatlabControl.java MatlabMessageListener.java
MatlabMess
nger.java;
MatlabMessageListener.java:35: package net.tinyos.util does not exist
import net.tinyos.util.*;
^
MatlabMessageListener.java:36: package net.tinyos.message does not exist
import net.tinyos.message.*;
^
MatlabMessageListener.java:41: cannot resolve symbol
symbol : class MessageListener
location: class net.tinyos.matlab.MatlabMessageListener
public class MatlabMessageListener implements MessageListener
^
MatlabMessageListener.java:59: cannot resolve symbol
symbol : class Message
location: class net.tinyos.matlab.MatlabMessageListener
public void messageReceived(int to, Message m){
^
MatlabMessenger.java:35: package net.tinyos.util does not exist
import net.tinyos.util.*;
^
MatlabMessenger.java:36: package net.tinyos.message does not exist
import net.tinyos.message.*;
^
MatlabMessenger.java:37: package net.tinyos.message does not exist
import net.tinyos.message.*;
^
MatlabMessenger.java:42: cannot resolve symbol
symbol : class Messenger
location: class net.tinyos.matlab.MatlabMessenger
public class MatlabMessenger implements Messenger
^
Note: MatlabClock.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
8 errors
make: *** [matlab] Error 1
I just want to connect the Matlab to TinyOS. I'm using Matlab R2006a
in a Windows XP Professional platform. Please give me a help. I'm
desesperated!
Thanks in advance
Milton Aguiar
P.S: When i add a new environment variable i put the value that is
the path to the directory that we want to pt in the classpath
environment. But in the variable name what i must put??
Michael Schippling escreveu:
Well, you have two things confused to start with.
Your original problem was "javac: not found",
which means that the execution PATH in your shell
(I assume cygwin's bash) is not correct. javac wasn't
found to be executed.
Once the dust clears, you then want to set the CLASSPATH for matlab
to include the results of the make that hitherto has failed to exec.
Fortunately there are two reasonably easy ways to proceed and they
should work for both issues. If you are on MSWidows you can go to
MyComputer-Properties-Advanced-EnvironmentVariables (on XP, I think
it a bit different on NT/W2k). There you should find "Path" in System
Variables. Just add the directory that contains your java install bin,
e.g.: c:\JAVA\j2sdk1.4.2_04\bin (put it BEFORE system32 or you will
get MSbill's version of java by mistake). Also note the delimiter used,
I think it's semi-colon ";" here...
You can set a system CLASSPATH here too. There may already be one to
edit, or create a new one and put all the paths that matlab wants, with
ummmmm....semi-colon....errr....delimiters (I can never remember
which).
You can also do this for only the bash shell (assuming that you start
matlab from a shell prompt). Edit a new batch file and put something
like:
export PATH="/cygdrive/c/JAVA/j2sdk1.4.2_04/bin:$PATH"
export
CLASSPATH="C:/tinyos/cygwin/opt/tinyos-1.x/tools/java;$CLASSPATH"
and whatever other entries you need...note that the separator for PATH
here is colon ':', just to keep us on our virtual toes. Once you write
the file, source it into the shell with: source [filename]
this reads it into your shell environment.
Then you should be able to do:
vincent:~ [257] type java
java is /cygdrive/c/JAVA/j2sdk1.4.2_04/bin/java
There also seems to be a "matlab classpath.txt file" someplace if you
follow Stephen Chou concurrent problems on this list...
As I said, see the man page for bash and also basic java install and
classpath instructions & doc to get a better understanding of setting
these things. Try google CLASSPATH for instance.
Someday this will all be done by computer.
MS
Milton Aguiar wrote:
I don't know how to edit the system classpath evironment. I must do
the following:
" It is important to compile the java files present in
'C:\tinyos\cygwin\opt\tinyos-1.x\tools\java\net\tinyos\matlab'
folder. We added the *'C:\MATLAB7\java\jar\jmi.jar'* to the system
class-path to compile. One should not forget to add
'c:\tinyos\cygwin\opt\tinyos- 1.x\tools\java\comm.jar' and
'c:\tinyos\cygwin\opt\tinyos-1.x\tools\java' to the system
class-path to compile. This will compile java files that are needed
to control Matlab through java "
How can i edit the system classpath ??
Thanks
Milton Aguiar
Michael Schippling escreveu:
Is the java install /bin directory in your PATH environment variable?
try: type javac or: type java
from the cygwin bash shell.
See: man bash for an excruciatingly long explanation...
MS
Milton Aguiar wrote:
Hi all:
When i try to compile the TinyOS Matlab tools an error occurs:
$ make matlab
javac MatlabClock.java MatlabControl.java
MatlabMessageListener.java MatlabMesse
nger.java;
javac: not found
make: *** [matlab] Error 127
Can someone help me??
Thanks in advance
Milton Aguiar
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help