Go to Post Namaste. Maybe we all one day will spend our energy trying to raise our own level to match that of the competition rather than trying to tear others down. - Rich Kressly [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-07-2013, 18:21
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
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)
Reply With Quote
  #2   Spotlight this post!  
Unread 29-07-2013, 19:07
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,572
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2014, 18:17
279 EMPIE's Avatar
279 EMPIE 279 EMPIE is offline
Head Progammer
AKA: Matthew Empie
FRC #0279 (Tech Fusion)
Team Role: Programmer
 
Join Date: Dec 2010
Rookie Year: 2011
Location: Toledo Ohio
Posts: 76
279 EMPIE is just really nice279 EMPIE is just really nice279 EMPIE is just really nice279 EMPIE is just really nice
Send a message via AIM to 279 EMPIE
Re: NetworkTable error

would you mind posting a link to that jar file?
__________________
2011- Programmer, Electrical, and Web
Cleveland Regional

2012- Head Programmer, Web, Driver
Pittsburg Regional, Saint Louis International

2013- Head Programmer
Cinnicinatti Regional, Taraho Regional
Reply With Quote
  #4   Spotlight this post!  
Unread 09-02-2014, 10:38
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 332
fovea1959 will become famous soon enough
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 09-02-2014, 15:43
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 332
fovea1959 will become famous soon enough
Re: NetworkTable error

yep. in the desktop-lib subfolder of the sunspotfrcsdk folder.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:06.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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