Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   NetworkTable error (http://www.chiefdelphi.com/forums/showthread.php?t=118096)

Arhowk 29-07-2013 18:21

NetworkTable error
 
I'm trying to make a SmartDashboard application that communicates with the robot via network tables. Im trying to use this code

Code:

        NetworkTable.setIPAddress("10.20.12.2");
        NetworkTable.setClientMode();
        try {
            NetworkTable.initialize();
        } catch (Exception e) {
            e.printStackTrace();
        }
        t = NetworkTable

but it prints this error

Code:

Exception in thread "main" java.lang.NoClassDefFoundError: javax/microedition/io/Connector
        at edu.wpi.first.wpilibj.networktables2.stream.SocketConnectionStream.<init>(SocketConnectionStream.java:26)
        at edu.wpi.first.wpilibj.networktables2.stream.SocketConnectionStreamFactory.createStream(SocketConnectionStreamFactory.java:27)
        at edu.wpi.first.wpilibj.networktables2.client.ClientConnectionAdapter.reconnect(ClientConnectionAdapter.java:84)
        at edu.wpi.first.wpilibj.networktables2.client.NetworkTableClient.reconnect(NetworkTableClient.java:46)
        at edu.wpi.first.wpilibj.networktables.NetworkTableMode$2.createNode(NetworkTableMode.java:39)
        at edu.wpi.first.wpilibj.networktables.NetworkTable.initialize(NetworkTable.java:52)
        at edu.wpi.first.wpilibj.networktables.NetworkTable.getTable(NetworkTable.java:106)
        at org.chimeras1684.ui.operation.SerialByteStreamReciever.<clinit>(SerialByteStreamReciever.java:26)
        at org.chimeras1684.ui.operation.NewDriverUI.main(NewDriverUI.java:35)
Caused by: java.lang.ClassNotFoundException: javax.microedition.io.Connector
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        ... 9 more
Exception in thread "Write Manager Thread" java.lang.NoClassDefFoundError: javax/microedition/io/Connector
        at edu.wpi.first.wpilibj.networktables2.stream.SocketConnectionStream.<init>(SocketConnectionStream.java:26)
        at edu.wpi.first.wpilibj.networktables2.stream.SocketConnectionStreamFactory.createStream(SocketConnectionStreamFactory.java:27)
        at edu.wpi.first.wpilibj.networktables2.client.ClientConnectionAdapter.reconnect(ClientConnectionAdapter.java:84)
        at edu.wpi.first.wpilibj.networktables2.client.ClientConnectionAdapter.ensureAlive(ClientConnectionAdapter.java:214)
        at edu.wpi.first.wpilibj.networktables2.WriteManager.run(WriteManager.java:146)
        at edu.wpi.first.wpilibj.networktables2.thread.DefaultThreadManager$PeriodicNTThread$1.run(DefaultThreadManager.java:18)
        at java.lang.Thread.run(Thread.java:722)


Joe Ross 29-07-2013 19:07

Re: NetworkTable error
 
It looks like it's using the cRIO version of network tables. If you're writing a program for your computer, you need to use the networktables-desktop.jar.

279 EMPIE 08-02-2014 18:17

Re: NetworkTable error
 
would you mind posting a link to that jar file? :D

fovea1959 09-02-2014 10:38

Re: NetworkTable error
 
hunt around in your sunspotfrc folder; I'm pretty sure it's gets plopped there as part of the Netbeans FRC Plugin install.

fovea1959 09-02-2014 15:43

Re: NetworkTable error
 
yep. in the desktop-lib subfolder of the sunspotfrcsdk folder.


All times are GMT -5. The time now is 09:31.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi