help for code to run motor

We are a rookie team and we wrote the following code to operate the motor.
We are not sure if it will work. Please help.

public class ParkwayRobot extends SimpleRobot
{
private final int PORT_ONE = 1;
private final int PORT_TWO = 2;
private final int MY_SLOT = 1; // or 2, 3, 4
private final double DESIRED_SPEED = 0.7;

RobotDrive drive = new RobotDrive(1, 2); // motors in ports 1 and 2
Joystick leftJoy = new Joystick(PORT_ONE);
Joystick rightJoy = new Joystick(PORT_TWO);

public void autonomous()
{

  Jaguar firstJaguar = new Jaguar(MY_SLOT, PORT_ONE);
  firstJaguar.set(DESIRED_SPEED);    //  between -1.0 and 1.0

}

public void operatorControl()
{

   while (isOperatorControl() && isEnabled())
    {
        Drive.tankDrive(leftJoy, rightJoy);
       Timer.delay(0.005);
    }

}

}

We are not sure how to compile and run this code using Netbeans. Please help.

Thanks a lot!

Well to start, you may want to be more specific with your names. Saying LEFTJOYSTICKPORT instead of PORT_1 is much more helpful because you won’t be accidentally mixing them up.

For running it, you have to go to setting, miscellaneous and put in your team number in the box where it says “team number.” Then you can build it and if you’re connected to the robot and on its subnet it will automatically upload it to the cRIO.

Any of the platforms that US FIRST provides teams with have examples that one can refer to and which can help you really understand the basic structure of programming in that language. I program in C++ and I know that they definitely have a SimpleRobot example. Maybe your platform has example programs as well.