ClassNotFound exception

Having to switch between Android Studio for FTC and Eclipse for FRC is hard. I have totally forgotten every little tricks I learned about Eclipse and roboRIO from last year. We copied our RecycleRush code from last season and stripped out the game specific code leaving pretty much a running base to the FirstStronghold code base. It compiled fine but when deploy the code to a simple 4-wheel drive base, it threw a ClassNotFoundException saying it cannot find the Robot class which is the root object of the program. I suspect it has something to do with copying last year’s code and missing a rename somewhere in the manifest. The only rename we did was searching for all RecycleRush and replacing with FirstStronghold which are mainly strings for debugging purposes. Does anybody know what we missed?


Unhandled exception instantiating robot org.usfirst.frc.team492.robot.Robot java.lang.ClassNotFoundException

Can you post code? Either a github repo or your main robot class

You can find our code here:

Is your robot class called TrcRobot? It should probably be called Robot, I think.

You just need to edit the package and class name in the build.properties if you don’t use the out of the box names from WPILibs wizard. We have a normal class path based on our website and call the main class Team501Robot. Every season I forget to do that the first pull, and have the same problem.

Thank you. I think that’s what I am looking for. BTW anybody knows where to get the WPILib source code these days? It used to be first forge but I believe that doesn’t exist any more. I also vaguely remember if I install the FRC update, the source code is zipped somewhere in some folder. But I searched all over and haven’t found it yet.

We distribute the code in ~/wpilib. You can also clone them directly from our repository. The ScreenSteps for that is here: https://wpilib.screenstepslive.com/s/4485/m/wpilib_source/l/480945-getting-the-source.