I am having an issue with building my program. I get a bad class file error
Buildfile: C:\Users\Cecilia\workspace\InfiniteRecharge_2020\build.xml
Trying to override old definition of task classloader
clean:
[delete] Deleting directory C:\Users\Cecilia\workspace\InfiniteRecharge_2020\build
compile:
[mkdir] Created dir: C:\Users\Cecilia\workspace\InfiniteRecharge_2020\build
[echo] [athena-compile] Compiling src with classpath=C:\Users\Cecilia\wpilib\user\java\lib\CTRE_Phoenix.jar;C:\Users\Cecilia\wpilib\user\java\lib\WPI_CTRE_Phoenix.jar;C:\Users\Cecilia\wpilib\user\java\lib\navx_frc.jar;C:\Users\Cecilia\wpilib\java\current\lib\WPILib.jar;C:\Users\Cecilia\wpilib\java\current\lib\ntcore.jar;C:\Users\Cecilia\wpilib\java\current\lib\opencv.jar;C:\Users\Cecilia\wpilib\java\current\lib\cscore.jar;C:\Users\Cecilia\wpilib\java\current\lib\wpiutil.jar to build
[javac] Compiling 41 source files to C:\Users\Cecilia\workspace\InfiniteRecharge_2020\build
[javac] C:\Users\Cecilia\workspace\InfiniteRecharge_2020\src\systems\subsystems\DriveTrain.java:10: error: cannot access ControlMode
[javac] import com.ctre.phoenix.motorcontrol.ControlMode;
[javac] ^
[javac] bad class file: C:\Users\Cecilia\wpilib\user\java\lib\CTRE_Phoenix.jar(com/ctre/phoenix/motorcontrol/ControlMode.class)
[javac] class file has wrong version 55.0, should be 52.0
[javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
BUILD FAILED
C:\Users\Cecilia\wpilib\java\current\ant\build.xml:93: Compile failed; see the compiler error output for details.
Buildfile: C:\Users\Cecilia\workspace\InfiniteRecharge_2020\build.xml
Trying to override old definition of task classloader
BUILD FAILED
C:\Users\Cecilia\workspace\InfiniteRecharge_2020\build.xml:28: The following error occurred while executing this line:
C:\Users\Cecilia\wpilib\java\current\ant\build.xml:14: No Handler found for ClassLoader jdk.internal.loader.ClassLoaders$AppClassLoader and action org.apache.tools.ant.taskdefs.classloader.ClassLoaderAdapterAction@c88a337
see listen here. you make a VERY good point. I will change that. once i find out how. I have been learning this stuff on my own and it has been… fun or something like that.
Once the project is created in VSCode, you may be able to open it in Eclipse using Eclipse’s gradle plugin. There may be some custom things you need to do to make that work, however; if you’re just getting started, I recommend you stick with VSCode at least for the short term, and then figure out how to get Eclipse to work with the created project. These days you’ll find very few teams using Eclipse.
Interesting. I expected eclipse to be the common IDE for this stuff. Weird but ok! I was just taking previous years code so the projects were already completely set up with all the necessary libraries.
The standard IDE for Java and C++ switched from Eclipse to Visual Studio Code starting in the 2019 season, and the underlying build system switched from Ant to Gradle at the same time. An official plugin for Visual Studio Code is provided to help with various commands like deploying to the robot, but fundamentally all the commands can be run at the command line. A number of teams use alternative IDEs like IntelliJ with their own plugins there, but that’s unofficial.