New to Java, Trying to Deploy Code

Ok so I am switching to Java and I am trying to deploy the code to the Robot. I have JRE installed on the Robot using the WPI Tool and I have the Code. When I go to “Run as” as per ScreenSteps it seems that everything is working fine, I get build successful but I do not get the Robot Code Green Light on the Dashboard, the dashboard is connected to the Robot, I am using USB to communicate with the robot in this process.

The lights on the RoboRIO are as follows: Power: Green (Given), Status: off, Radio: off, COMM: Red, Mode: off.
Note: the COMM light flashes ever once in a while. I also can access the Web GUI on the USB IP:

The Console information:

Buildfile: C:\Users\robotics1\Documents\GitHub\5420-JAVA-Code-ROBOT-2015\build.xml
Trying to override old definition of task classloader
   [delete] Deleting directory C:\Users\robotics1\Documents\GitHub\5420-JAVA-Code-ROBOT-2015\build
   [delete] Deleting directory C:\Users\robotics1\Documents\GitHub\5420-JAVA-Code-ROBOT-2015\dist
    [mkdir] Created dir: C:\Users\robotics1\Documents\GitHub\5420-JAVA-Code-ROBOT-2015\build
     [echo] [athena-compile] Compiling src with classpath=C:\Users\robotics1\wpilib\java\current\lib\WPILib.jar;C:\Users\robotics1\wpilib\java\current\lib\NetworkTables.jar;C:\Users\robotics1\wpilib\java\current\lib\opencv.jar;C:\Users\robotics1\wpilib\java\current\lib\cscore.jar to build
    [javac] Compiling 5 source files to C:\Users\robotics1\Documents\GitHub\5420-JAVA-Code-ROBOT-2015\build
     [echo] [athena-jar] Making jar dist/FRCUserProgram.jar.
    [mkdir] Created dir: C:\Users\robotics1\Documents\GitHub\5420-JAVA-Code-ROBOT-2015\dist
    [mkdir] Created dir: C:\Users\robotics1\Documents\GitHub\5420-JAVA-Code-ROBOT-2015\build\jars
     [echo] [athena-jar] Copying jars to build/jars.
     [copy] Copying 4 files to C:\Users\robotics1\Documents\GitHub\5420-JAVA-Code-ROBOT-2015\build\jars
      [jar] Building jar: C:\Users\robotics1\Documents\GitHub\5420-JAVA-Code-ROBOT-2015\dist\FRCUserProgram.jar
     [echo] Finding roboRIO, please ignore any [hostinfo] error messages
     [echo] Trying USB:
     [echo] Trying DNS: roboRIO-5420-FRC.lan
     [echo] Trying mDNS: roboRIO-5420-FRC.local
     [echo] Trying mDNS: roboRIO-5420-FRC.frc-robot.local
     [echo] Trying Static Ethernet:
     [echo] roboRIO found at
 [hostinfo] Error retrieving remote host information for host:roboRIO-5420-FRC.frc-robot.local.
 [hostinfo] Error retrieving remote host information for host:roboRIO-5420-FRC.lan.
     [echo] roboRIO image version validated
     [echo] Checking for JRE. If this fails install the JRE using these instructions:
  [sshexec] Connecting to
  [sshexec] cmd : test -d /usr/local/frc/JRE
   [delete] Deleting: C:\Users\robotics1\wpilib\java\current\lib
      [scp] Connecting to
      [scp] Receiving file: /usr/local/frc/lib/
      [scp] Receiving: : 2680
      [scp] File transfer time: 0.01 Average Rate: 446,666.67 B/s
      [scp] done
      [scp] Connecting to
      [scp] Receiving file: /usr/local/frc/lib/
      [scp] Caught exception: scp: /usr/local/frc/lib/ No such file or directory
     [echo] [athena-deploy] Copying code over.
      [scp] Connecting to
      [scp] done.
  [sshexec] Connecting to
  [sshexec] cmd : ldconfig
  [sshexec] Connecting to
  [sshexec] cmd : killall -q netconsole-host || :
   [delete] Deleting: C:\Users\robotics1\wpilib\java\current\ant
      [scp] Connecting to
     [echo] Resolved mDNS to
      [scp] Receiving file: /usr/local/frc/bin/
      [scp] Receiving: : 132
      [scp] File transfer time: 0.0 Average Rate: 132,000.0 B/s
      [scp] done
      [scp] Connecting to
      [scp] done.
     [echo] [athena-deploy] Starting program.
  [sshexec] Connecting to
  [sshexec] cmd : . /etc/profile.d/; /usr/local/frc/bin/ -t -r;
  [sshexec] Connecting to
  [sshexec] cmd : sync
Total time: 9 seconds


DS:  17.0.1
RIO:  FRC_roboRIO_2017_v8
Lib:  Java 2017.3.1
PCM:  1.65
PDP:  1.40

Anything can help, Thanks Noah.

We would be able to help you more easily if you post your code so we can look at it. :slight_smile:

The Code for the Robot

Ok, I have found the Error, Because its me and another Person making this program, I overlooked that they added an encoder on the same DIO port on line 43 (conflicts with line 47). I am now Getting a COMM: Green and a RobotCode that is Green too.

I am still getting the Dirrectory not found in the Console

      [scp] Caught exception: scp: /usr/local/frc/lib/ No such file or directory

Thanks for the Efforts of trying to fix a mistake that I have made. Sorry for wasting some of your time.

IIRC this is normal and can be disregarded.

Ah, the best way to handle errors.

catch (Exception e){}

The reason this is ignored is that file only exists if 3rd party libraries are used. We always check for the existence of that file, but its not guaranteed to exist, and not necessary for deploy to work.

Can anyone help me learn how to code java. New to it and am not understanding anything.

Send me a Message and I can see what time I have to Help you.