Main.java problems

With the 2019 java code there appears to be a new main class required. I used the eclipse importer to bring in existing code for our old robot. I made a direct copy of main for a new example project, only changing the path for package. However after deploying code to the roborio I keep getting this in the Riolog:

  • Error: Could not find or load main class main.java.com.team3335.butterfly.Main

  • Caused by: java.lang.ClassNotFoundException: main.java.com.team3335.butterfly.Main

Any help is greatly appreciated!

In the build.gradle file, find the line that looks like:

def ROBOT_MAIN_CLASS = "team6072.robo2019.Main"

and make sure the Main class is correctly defined - in your case:

def ROBOT_MAIN_CLASS = "team3335.butterfly.Main"

About to load it up, but it looks like that is going to be the problem. Thank you so much!

It only cost me an hour a few nights ago… :slight_smile: