Go to Post You know you have bad field problems if both Dean and Woodie come out to try to fix them... :) - tim_reiher [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 04-02-2017, 14:02
EmileH's Avatar
EmileH EmileH is offline
#dontbelarge
AKA: Emile Hamwey
FRC #1058 (The PVC Pirates) & SLFF (NE Way You Want It)
Team Role: Programmer
 
Join Date: Dec 2014
Rookie Year: 2011
Location: New England
Posts: 551
EmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant future
ntcore not found in java.library.path - GRIP generated code + networktables error

Hello everyone!

Team 1058 is making good strides with our vision processing this year, however we are having some issues with loading the native library for NetworkTables on our Raspberry Pi 3. We have downloaded and installed the WPILib plugins for eclipse (running on the Pi) and pointed the properties>java build path to the NetworkTables.jar file (installed in /home/pi/wpilib/java/current/lib).

When running our code, which is:
Code:
	import edu.wpi.first.wpilibj.networktables.*;

public class SendNetworkTables {
	static NetworkTable visionTable;
	public SendNetworkTables() {
		// TODO Auto-generated constructor stub
		NetworkTable.setClientMode();
		NetworkTable.setIPAddress("localhost");
		visionTable = NetworkTable.getTable("pirateVisionReport");
	}
	public static void sendData(double distanceFromCenter, double distanceInches){
		visionTable.putNumber("distanceFromCenterX", distanceFromCenter);
		visionTable.putNumber("distanceInchesZ", distanceInches);
		
		
	}

}
(note this is only the class that interfaces with NetworkTables, sendData is called from another class)

We recieve the error:
Code:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no ntcore in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1119)
	at edu.wpi.first.wpilibj.networktables.NetworkTablesJNI.<clinit>(NetworkTablesJNI.java:59)
	at edu.wpi.first.wpilibj.networktables.NetworkTable.setIPAddress(NetworkTable.java:119)
	at edu.wpi.first.wpilibj.networktables.NetworkTable.setIPAddress(NetworkTable.java:108)
	at SendNetworkTables.<init>(SendNetworkTables.java:8)
	at Default.<clinit>(Default.java:33)
We've tried moving libntcore.so to /usr/lib which is one of the java.library.path locations, specified by running the command "java -XshowSettings: properties -version".

Any thoughts?
__________________
2016-present: High School Student, FRC 1058 PVC Pirates


Last edited by EmileH : 04-02-2017 at 14:05.
Reply With Quote
  #2   Spotlight this post!  
Unread 04-02-2017, 20:35
SamCarlberg's Avatar
SamCarlberg SamCarlberg is online now
GRIP, WPILib. 2084 alum
FRC #2084
Team Role: Mentor
 
Join Date: Nov 2015
Rookie Year: 2009
Location: MA
Posts: 161
SamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to behold
Re: ntcore not found in java.library.path - GRIP generated code + networktables error

You have to use the version of ntcore compiled for the platform you're running on. The jar that comes with the Eclipse plugins only has the JNI for the roborio. If you use the raspbian jar, it'll self-extract the JNI and you'll be set.

Most recent version (3.1.6)

More generally, you can find every version (for Java) at

first.wpi.edu/FRC/roborio/maven/release/edu/wpi/first/wpilib/networktables/java/NetworkTables
__________________
WPILib
GRIP, RobotBuilder

Last edited by SamCarlberg : 04-02-2017 at 23:36. Reason: wrong platforms listed
Reply With Quote
  #3   Spotlight this post!  
Unread 04-02-2017, 23:23
EmileH's Avatar
EmileH EmileH is offline
#dontbelarge
AKA: Emile Hamwey
FRC #1058 (The PVC Pirates) & SLFF (NE Way You Want It)
Team Role: Programmer
 
Join Date: Dec 2014
Rookie Year: 2011
Location: New England
Posts: 551
EmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant future
Re: ntcore not found in java.library.path - GRIP generated code + networktables error

Gotcha. We'll give that a go on Monday when we have our next meeting. We had some members download the pi toolchain and make attempts to compile ntcore for the pi but had troubles moving it over from the development laptop.

Thanks for the help as always!
__________________
2016-present: High School Student, FRC 1058 PVC Pirates

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 09:44.

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