Major Changes: roboRIO has a Java 8 SE Embedded JVM Official Support for the Eclipse IDE 0 based port numbers
##Getting Started With Java Quick Guide
- Wire control system according to official wire diagram. See the Electrical FAQ for more info.
- Flash and image roboRIO to Latest versions. See the roboRIO FAQ for more info.
- Install JVM on roboRIO. See question below.
- Install 32-bit Java 8 Development Kit on Development Computer (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) Note: Mac Users must install 64-bit JDK
- Download 32-bit Eclipse IDE for Java Development on Development Computer (install 32-bit even if you are on 64-bit OS) Luna
- Extract eclipse to your desired location.
- Open Eclipse and install Official FRC Plugins [plugin URL Released at KickOff] ()
- Create New WPI lib Java Project File->New->Other->WPI Robot Project
- Enter team number and project name, Select either “Command Based” or “Iterative Robot” frameworks
- Manually add JDK to “Build Path” for your Robot Project (Right Click Project -> Build Path -> etc..)
- Deploy code to robot.
##How do I install the Java Virtual Machine on the roboRIO
Installing the JVM for Embedded Devices, is not the same as installing the JVM on a desktop. Oracle, the developers of the Java Virtual Machine for Embedded Devices decided to release the JVM with a special installation procedure. The user must download the JVM to a host computer and run a program which builds an embedded JVM for your target with all of the configurations you desire. Then, you transfer the built JVM to your target (embedded device).
FIRST has created an easy-to-follow process that does all of the configurations for you, and runs the commands to build the JVM for you so that you do not need to be concerned with the details. Follow their directions below. If you wish to do it on your own, I am working on posting the manual steps required.
###Official FIRST Procedure Ensure roboRIO is flashed and imaged to latest versions then continue with Offical screensteps directions
- Create an account on Oracles Website oracle
- Download the Java SE 8 Embedded JVM for ARMv7 Linux VFP, SoftFP ABI, Little Endian ARM JVM
- Use 7-zip to untar the download on your host machine
TO BE CONTINUED
##Can I see live Program Output in Eclipse?
Yes. Use the RIOLog Viewer. Official steps here Screensteps Live
To find the RIOLog window, in eclipse, go to Window, Show View, Other and search for RIOlog and you’ll see it. Once you add it, it will stay around between eclipse restarts.
##Can I use an older version of Eclipse like Kelper with the plugins? Yes, but only with a Java v7 or earlier JDK. There is a ANT build bug in older version of eclipse where the default ANT build version that ship with the older eclipse versions do not recognize Java v8.
See the bug report here: bug
We recommend using Eclipse Luna where ever possible, with JDK v8, but if you must use Kepler, downgrade the JVM to v7 or run the fix noted in the bug report to use JVM v8 with Eclipse Kepler.
##When I deploy code, where is it saved on the roboRIO?
User programs are downloaded to /home/lvuser directory
##When I open eclipse I get an error stating “Unable to find JVM”
This problem is most likely caused by not having a JVM or JDK installed on your computer. Please install a JVM on your programming computer in accordance with step 4 of the quick start guide above.
##When I Deploy My Java Program I get an “Unable to find Javac Message”
If you get a message similar to the one below:
Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK
It means you haven’t set up your project build path with a Java Development Kit (JDK).
##When I deploy I get “Remote command failed with exit status 1” error
If you get an error similar to this after line
cmd : test -d /usr/local/frc/JRE
The most likely cause is your roboRIO does not have the Java JVM installed. Please be sure to follow the steps exactly above to install the JVM on the roboRIO.
If you believe you installed the JVM but are still receiving this error, please ensure that the JVM is in the right location and that that the bin file has the executable attribute set.
- Use “find” to determine where the JVM is located. Run
find / -name *jar*in the roboRIO terminal. The
jarapplication must be in the location
- Once the JVM is in the right folder location ensure the execute attribute is set
chmod +x /usr/local/frc/JRE/bin/*
##After I deploy code from eclipse, the DS still shows no Robot Code.
This most likely means your code is crashing upon startup. Check for any runtime errors, like null pointers, or other exceptions. See the roboRIO FAQ for more details on what this status light means.
##Can you tell me whats new between 2014 Java and 2015 Java WPILib
- This list is a work in progress and will be provided soon
##Can I install the WPILib Eclipse plugins on a computer that does not have connection to the internet?
Yes. You can install it as a local plugin, but you will need to use a computer with internet connection to download it first.
###On Computer with Internet connection
- Open a web browser and navigate to the URL where the Eclipse plugins are kept
- Create a folder somewhere on the computer and name it whatever you want, I just use WPIPlugin
- Download the artifacts.jar file to the computer and save it to the folder you created
- Download the contents.jar file to the computer and save it to the folder you created
- Create a folder called “features” inside of the folder you created in step 2.
- Create a folder called “plugins” inside of the folder you created in step 2.
- In your web browser click on the features link of the WPI plugins website, and download the latest features.jars (should be 3 files). You can use the site.xml site to determine which is the latest, or just look for the last modified date. Save this file inside of the features folder you created.
- In your web browser click on the plugins link of the WPI plugins website, and download the latest plugins.jars (should be 4 files). You can use the site.xml site to determine which is the latest, or just look for the last modified date. Save this file inside of the plugins folder you created.
- Save this folder and all of its contents to portable media like a flash drive
###On computer with Eclipse wishing to install WPI plugins.
- Open Eclipse
- Transfer folder to computer previously downloaded containing the plug-ins
- Navigate to help->install new software
- Click Add
- Name it whatever you like i.e. WPIPluginsV20
- Select local and navigate to the folder
- Click OK
- Install the Java or C++ plugins
This will allow you to install the plugins locally, and you can use the same folder to install to multiple computers.