Netbeans Basics
It's always a good idea to check for updates first!
Let's do some Java Programming!
This tutorial was written to help those who know a bit about Java use Netbeans to compile and run their code...
I assume that you have set up netbeans as described here.
- Creatng a project...
- File > New Project...
- FRC Java[If you dont have this as an option you should go back and re-read the Netbeans config]
- Choose SimpleRobotTemplateProject
- All the fields are fairly straightforward, with a few exceptions:
- You should change the name of the project.
- I would recommend also changing the project package to: edu.wpi.first.wpilibj
- NOTE: if you are importing someone else's code, you will need to change the Robot Class field to whatever they called it, you can find it in the code as the part of the opening statment, something like "public class LunacyBot". In that case, Robot Class would be LunacyBot.
- On the left you should see the project pane... open all the foldersĀ [the name of your project] > src > edu.wpi.first.wpilibj > Here you should see a .java file.
- The [the name of your Robot Class].java is the file that will need to contain the java code to run your robot.
- Upon further inspection, you will notice that there are two methods available...
- public void autonomous() [For your autonomous code]
- public void operatorControl() [For your TeleOpp code]
- I would recommend looking at my sample code.
- Compiling code
- The hammer tool allows for building code, it will also double check for syntax errors.
- Downloading Code
- The play button will build and deploy code to cRio.
- NOTE: You will need to set the IP Address of the Classmate to be able to connect to the cRio... See below.
- NOTE: You will probably need to use your (orange/pink) crossover cable to download code to your robot.
- Setting the IP Address on the Classmate
- Log in as the driver.....
- Go to the setup tab at the bottom
- Enter your ip address
- Apply the changes

