![]() |
navX MXP Import Issue
I'm working on setting up the navX on Java with our roboRIO. I've followed the steps listed in this tutorial http://www.pdocs.kauailabs.com/navx-...ibraries/java/ and I'm still getting an error with the import. Here's what the error is saying:
Code:
Buildfile: C:\Users\Developer\Documents\GitHub\DeltaBot\build.xmlCode:
import com.kauailabs.navx.frc.AHRS; |
Re: navX MXP Import Issue
I believe a step or two in the java library configuration instructions was missed, specifically these one:
1) Add a Java Build Variable for the navX-MXP Java Library. To set the build variable, from the Eclipse menu select Window->Preferences->Java->Build Path->Classpath Variables, then click on the “New…” button. Then, in the “New Variable Entry” dialog, set the name to “navx-mxp” and set the Path to <HomeDirectory>\navx-mxp\java\lib\navx_frc.jar. Hit OK to save this change. and... 2) Ensure that your project’s library paths include the navx-mxp variable, as well as WPI library path variables (networktables and wpilib). If any are missing, you can add them by clicking on the “Add Variable…” button. If either the "navx-mxp" build variable is not present in the Eclipse Java ClassPath Variables settings - or if your project's library paths do not include this "navx-mxp" variable, the error message you have reported is the very likely result. |
Re: navX MXP Import Issue
Quote:
Code:
[echo] [athena-compile] Compiling src with classpath=C:\Users\Developer/wpilib/java/current/lib/WPILib.jar:C:\Users\Developer/wpilib/java/current/lib/NetworkTables.jar to build |
Re: navX MXP Import Issue
I don't believe the forward slashes is where the problem lies.
The navx-mxp.jar file should be in the classpath. However, I don't see it listed in the classpath in your latest message (although I do see the WPI library .jar and I do see Networktables.jar). So I think the problem is that when eclipse builds your project, it can't find navx-mxp.jar. And that is confirmed by the complaint that it can't locate the AHRS class, which is contained within the navx-mxp.jar library. |
Re: navX MXP Import Issue
Please post the build.properties of the project
|
Re: navX MXP Import Issue
since the navx jar is not showing up in the classpath, it looks like the build.properties is not set up correctly.
Quote:
|
Re: navX MXP Import Issue
I believe the issue is that WPILib doesn't know where to find the navx jar file. You must configure the build.properties as shown here.
|
Re: navX MXP Import Issue
The build.properties seems to be setup correctly according to the FRC tutorial on adding 3rd party libraries:
Code:
# Project specific information |
Re: navX MXP Import Issue
Quote:
|
Re: navX MXP Import Issue
I checked Eclipse and found that someone had turned off automatic updates, and so I did have an older version of the WPI Libraries, however after updating I am still confronted with the same error messages. Is it possible Eclipse did not update to the true current version?
|
Re: navX MXP Import Issue
Quote:
|
Re: navX MXP Import Issue
Our Java plugin version is (0.1.0.201601151923) which is listed as the latest version, but the kickoff version seems to be more recent (0.1.0.201601072029). When press the update button in eclipse it says that no updates were found, but if ours is the ...23 version and there is a newer ...29 version, shouldn't it find that version and update or am I missing something? Is ...23 more recent than ...29?
|
Re: navX MXP Import Issue
Quote:
|
Re: navX MXP Import Issue
Okay so we know the eclipse plugins are up to date. My error message has changed slightly to reflect that it is finding some sort of navX library, or at least its looking for one, as you can see below:
Code:
[echo] [athena-compile] Compiling src with classpath=C:\Users\Developer/wpilib/java/current/lib/WPILib.jar:C:\Users\Developer/wpilib/java/current/lib/NetworkTables.jar:C:\Users\Developer |
Re: navX MXP Import Issue
Quote:
Here's what you entered in your build.properties: userLibs=${user.home}/navx-mxp/java/lib/navx_frc.jar But it appears that when eclipse is building, each time the "/n" characters are encountered, those characters are being treated as a new-line character. It's interesting to note that the \n sequence (where \ is an 'escape' character) translates to an ascii new-line character, which is what eclipse appear to be outputting. This is likely a system-specific configuration issue, and I'm going to recommend trying it on another system - or else identifying what it is in your system that is interpreting "/n" in file system paths as a new line character. I've see this kind of thing happen sometimes if a package like Cygwin is installed, although I can't remember the details off of the top of my head. |
| All times are GMT -5. The time now is 03:18. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi