|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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
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) |
|
#2
|
||||||
|
||||||
|
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.
|
|
#3
|
||||
|
||||
|
Re: NetworkTable error
would you mind posting a link to that jar file?
![]() |
|
#4
|
||||
|
||||
|
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.
|
|
#5
|
||||
|
||||
|
Re: NetworkTable error
yep. in the desktop-lib subfolder of the sunspotfrcsdk folder.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|