= Setting Up Your Computer for FRC Java Programming == 1. Install Java SE 8 Make sure the correct version of Java SE 8 is installed. You will need the JDK (Java Software Development Kit); the current version is JDK 8u101. The installation can be found on [http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Oracle's site]. Make sure to accept the license agreement, or it won't let you download. == 2. Install Eclipse For best performance and to avoid compatibility errors, download the latest version of Eclipse for Java Developers, currently [https://eclipse.org/downloads/packages/eclipse-ide-java-developers/neon1 Eclipse Neon] (as of 10-7-16). [https://eclipse.org/downloads/packages/eclipse-ide-java-developers/mars1 Eclipse Mars] and [https://eclipse.org/downloads/packages/eclipse-ide-java-developers/lunasr2 Eclipse Luna] also works. === Troubleshooting ==== I downloaded a zip file, but no installer. How do I get Eclipse? For versions before Eclipse Mars, Eclipse is actually a Java program, not an executable. To use, simply find the program file inside the folder hierarchy and open. As long as Java has been installed correctly, the application will start up successfully. For ease of operation, it is usually beneficial to move the folder containing the Eclipse program files to a more appropriate place and/or create a shortcut to the program. ==== "No compiler/jdk found" - JAVA_HOME not set correctly This error usually occurs when the Eclipse reference to the JDK is not set to the right location on the local computer.[[BR]] To fix this, go to {{{Window}}} ({{{Eclipse}}} on Macs), {{{Preferences}}}, {{{Java}}}, and under the Java hierarchy, select {{{Installed JREs}}} and in the menu, make sure there is a valid link to a JDK on the local computer. {{{ #!div class="important" See [http://wpilib.screenstepslive.com/s/4485/m/13810/l/145002-installing-eclipse-c-java here] for more detailed instructions not covered here. }}} == 3. Install the Java FRC Plugins These plugins will allow you to be able to program the roboRIO. 1. In Eclipse, select the Help menu in the top menu bar. 2. Select {{{Install new software...}}}. 3. In the site field, enter in {{{ http://first.wpi.edu/FRC/roborio/release/eclipse/ }}} 4. In the menu below, check the box {{{Show only software applicable to target environment}}}. 5. Then click the arrow next to {{{WPILib Robot Development}}} and select {{{Robot Java Development}}} and click {{{Next}}}. 6. Click {{{Next}}} on the next window and accept all of the license agreements. 7. Click {{{Finish}}} to install. 8. There may be a security warning about unsigned content. Press {{{OK}}} to continue. This happens because eclipse is not perfect. 9. After installing, restart Eclipse. The plugins will continue to install when Eclipse starts back up. This is normal operation. == 4. Installing Cantalon stuff In their infinite wisdom, WPI decided to unbundle any library that interfaces with actual stuff a couple months before build. I can't see anything going wrong with that. Because of this, you have to download the cantalon library manually from CTR's site. 1. Download the Cantalon libraries from [http://www.ctr-electronics.com//downloads/lib/CTRE_FRCLibs_NON-WINDOWS_v4.4.1.9.zip] (up to date as of 1/14/17) 2. Merge the java/lib folder in the archive with the JDK lib folder. This should be in C:\Documents and Settings\[user] on Windows or your home folder on Linux. If you use Mac OS X, you're going to have to install a decent operating system on your computer. == 5. Creating a FRC Java Project 1. In Eclipse, right-click in the open space in the Package Explorer and select {{{New >}}}, and then inside the sub-menu that pops up, select {{{Project...}}}. Selecting {{{Java Project...}}} will not work. 2. Under {{{WPILib Robot Java Development}}}, select {{{Robot Java Project}}}. 3. After clicking next, if creating a FRC Java Project for the first time, there will be a prompt for team number. Enter {{{ 2537 }}} 4. In the next screen, specify a unique, identifiable project name, preferably one that will not be confused with other, similar projects. Enter in a new, custom package hierarchy or leave the default. 5. Choose a project template: a. Iterative - cyclic program execution; your code is repeated every 20 ms b. Command-Based - event-driven program execution c. Simple - ''DO NOT USE'' 6. Click {{{Finish}}}.