|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
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);
}
}
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) Any thoughts? Last edited by EmileH : 04-02-2017 at 14:05. |
|
#2
|
||||
|
||||
|
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 Last edited by SamCarlberg : 04-02-2017 at 23:36. Reason: wrong platforms listed |
|
#3
|
|||||
|
|||||
|
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! |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|