[Tinyos-help] error in running java program (SerialForwarder and TestSerial) in linux ubuntu

bayu anggorojati bayu.aj at gmail.com
Mon Feb 25 08:15:48 PST 2008


Hi,

I am installing the tinyOS linux ubuntu. Basically I can successfully
compile and install the tinyOS program. But when I tried to run a java
program, such as SerialForwarder it gave me the following error:
Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit:
gnu.java.awt.peer.gtk.GtkToolkit
   at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70)
   at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(libgcj.so.70)
   at java.awt.Window.<init>(libgcj.so.70)
   at java.awt.Frame.<init>(libgcj.so.70)
   at javax.swing.JFrame.<init>(libgcj.so.70)
   at net.tinyos.sf.SFWindow.createGui(SFWindow.java:87)
   at net.tinyos.sf.SerialForwarder.<init>(SerialForwarder.java:105)
   at net.tinyos.sf.SerialForwarder.main(SerialForwarder.java:92)
Caused by: java.lang.UnsatisfiedLinkError: libgtkpeer: libgtkpeer.so: cannot
open shared object file: No such file or directory
   at java.lang.Runtime._load(libgcj.so.70)
   at java.lang.Runtime.loadLibrary(libgcj.so.70)
   at java.lang.System.loadLibrary(libgcj.so.70)
   at gnu.java.awt.peer.gtk.GtkToolkit.<clinit>(libgcj.so.70)
   at java.lang.Class.initializeClass(libgcj.so.70)
   at java.lang.Class.forName(libgcj.so.70)
   at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70)
   ...7 more

I also found out that other java program is also not working, like the
TestSerial program. The error when I was running TestSerial (java) program
is as follows:
Exception in thread "main" java.lang.NoClassDefFoundError: TestSerial
   at gnu.java.lang.MainThread.run(libgcj.so.70)
Caused by: java.lang.ClassNotFoundException: TestSerial not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:/opt/tinyos-2.x/support/sdk/java/tinyos.jar],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.so.70)
   at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.70)
   at java.lang.ClassLoader.loadClass(libgcj.so.70)
   at java.lang.ClassLoader.loadClass(libgcj.so.70)
   at gnu.java.lang.MainThread.run(libgcj.so.70)

Is there anything that is missed here, like installing the package, setting
the environment or whatever?
Thank you in advance for your help.

Best Regards,
Bayu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20080225/a57a32ed/attachment.htm


More information about the Tinyos-help mailing list