You are right the warnings seem harmless enough, it's just Java
trying to help you do things the way they want you to.
The error is odd, as JColorChooser seems to be a standard part of
the javax.swing package since v1.4.2. Are you using an older JDK?
Try "type javac", "type java", and "java -version"...
It looks like the libgcj.so that is referenced is part of a GNU Java
compiler of which I know nothing. Perhaps you have a crossed up system?
Try googling the offending names (that's what I just did) and see if it
leads anywhere.
MS
David Li wrote:
> Hi,
>
> Following the tutorial, I compiled the Oscilloscope java code and got
> the warnings which I think was probably harmless:
>
> ----------------------------------------- Warnings
> ----------------------------------------------------------------
> mig -target=null -java-classname=OscilloscopeMsg java ../Oscilloscope.h
> oscilloscope -o OscilloscopeMsg.java
> ncg -target=null -java-classname=Constants java ../Oscilloscope.h
> NREADINGS DEFAULT_INTERVAL -o Constants.java
> javac *.java
> ----------
> 1. WARNING in ColorCellEditor.java (at line 17)
> public class ColorCellEditor extends AbstractCellEditor
> ^^^^^^^^^^^^^^^
> The serializable class ColorCellEditor does not declare a static final
> serialVersionUID field of type long
> ----------
> ----------
> 2. WARNING in Data.java (at line 11)
> import java.util.*;
> ^^^^^^^^^
> The import java.util is never used
> ----------
> ----------
> 3. WARNING in Graph.java (at line 13)
> import java.awt.event.*;
> ^^^^^^^^^^^^^^
> The import java.awt.event is never used
> ----------
> 4. WARNING in Graph.java (at line 16)
> import java.util.*;
> ^^^^^^^^^
> The import java.util is never used
> ----------
> 5. WARNING in Graph.java (at line 19)
> class Graph extends JPanel
> ^^^^^
> The serializable class Graph does not declare a static final
> serialVersionUID field of type long
> ----------
> ----------
> 6. WARNING in Window.java (at line 37)
> class MoteTableModel extends AbstractTableModel {
> ^^^^^^^^^^^^^^
> The serializable class MoteTableModel does not declare a static final
> serialVersionUID field of type long
> ----------
> 7. WARNING in Window.java (at line 112)
> static class MoteColor extends JLabel implements TableCellRenderer {
> ^^^^^^^^^
> The serializable class MoteColor does not declare a static final
> serialVersionUID field of type long
>
> --------------------- End of Warnings
> -----------------------------------------------------------------
>
> But when I tried to launch by "./run", it failed:
>
> Exception in thread "main" java.awt.AWTError: No suitable parent found
> for Component.
> at javax.swing.JColorChooser.createDialog(libgcj.so.90)
> at ColorCellEditor.<init>(ColorCellEditor.java:25)
> at Window.setup(Window.java:166)
> at Oscilloscope.run(Oscilloscope.java:54)
> at Oscilloscope.main(Oscilloscope.java:128)
>
> I suspect it might be something wrong with my *CLASSPATH*:
> .:/opt/tinyos-2.1.0/support/sdk/java/tinyos.jar:/usr/lib/jvm/java-1.5.0-sun-1.5.0.18/jre/lib
>
> Any comments?
>
> Thanks.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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