Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Eclipse Java Compile Issue (http://www.chiefdelphi.com/forums/showthread.php?t=137932)

lakecat 07-08-2015 16:40

Eclipse Java Compile Issue
 
I have an iterative robot project that I split up into a number of packages. I added two extra packages underneath the usual org.usfirst.frc.team2635.robot package. Before splitting the project into packages, I was able to upload to the robot just fine. Now when I try to run, I get a long string of build errors like this:
Code:

compile:
    [mkdir] Created dir: C:\Users\localuser\Desktop\workspace\LiftBotJava\build
    [echo] [athena-compile] Compiling src with classpath=${wpilib.jar}:${networktables.jar} to build
    [javac] Compiling 26 source files to C:\Users\localuser\Desktop\workspace\LiftBotJava\build
    [javac] C:\Users\localuser\Desktop\workspace\LiftBotJava\src\org\usfirst\frc\team2635\robot\IElevationSetter.java:3: error: package edu.wpi.first.wpilibj does not exist
    [javac] import edu.wpi.first.wpilibj.SpeedController;
    [javac]                            ^
    [javac] C:\Users\localuser\Desktop\workspace\LiftBotJava\src\org\usfirst\frc\team2635\robot\IElevationSetter.java:7: error: cannot find symbol
    [javac]        void setLiftElevation(Double setPoint, SpeedController lift1, SpeedController lift2);
    [javac]                                                ^
    [javac]  symbol:  class SpeedController
    [javac]  location: interface IElevationSetter
    [javac] C:\Users\localuser\Desktop\workspace\LiftBotJava\src\org\usfirst\frc\team2635\robot\IElevationSetter.java:7: error: cannot find symbol
    [javac]        void setLiftElevation(Double setPoint, SpeedController lift1, SpeedController lift2);
    [javac]                                                                      ^
    [javac]  symbol:  class SpeedController
    [javac]  location: interface IElevationSetter

And so on for 100 errors. Has anyone else had this problem?

Joe Ross 11-08-2015 11:25

Re: Eclipse Java Compile Issue
 
It would help if you posted your project.

krieck 11-08-2015 18:45

Re: Eclipse Java Compile Issue
 
Your build is having trouble finding the WPILIB library files, which should be "wpilib" directory in your home directory.

The third line of your log (the one describing the classpath) is a little weird, like it knows which two JAR files to load, but doesn't know where they are. This line should usually be an explicit pair of file paths.

You could try diagnosing the build.xml and build.properties files (there are some in your project directory and others under the wpilib directory). Or, you could just try trashing your wpilib directory and then reloading the FRC plugins.

Jared 12-08-2015 16:12

Re: Eclipse Java Compile Issue
 
I'm guessing you have imported an existing project into eclipse.

Try creating a new FRC Java robot project, compiling the new project and compiling this one again.

It can't find the wpilib jars because it thinks your classpath is "${wpilib.jar}". This should automatically get replaced by the actual classpath by whatever ant reads from the build.properties file. This doesn't get set up properly until you've created a new project.


All times are GMT -5. The time now is 10:23.

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