Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   What Version of Java is It? (http://www.chiefdelphi.com/forums/showthread.php?t=126231)

Apeace 10-02-2014 23:13

What Version of Java is It?
 
So, I was recently trying to fix up my code for our robot and I tried using enumerated variables. When I tried typing it in, netbeans complained that I was using source 1.3 and I needed at least 1.5. I'm pretty sure I'm on 1.7, and when I create a non-FRC project I can make enums just fine. I can't though within a FRC project for some reason.

Is the robot running off Java 1.3 or something?

Domenic Rodriguez 10-02-2014 23:37

Re: What Version of Java is It?
 
From what I recall when I last looked it up, FRC uses a version of the Squawk JVM, which is a Java ME (J2ME) implementation using CLDC 1.1. The FRC Java environment was based on the SunSPOT project, hence the "sunspotfrcsdk" directory. This means it is roughly equivalent to Java SE 1.3/1.4. Unfortunately that means no enums, and you'll have to use older classes like Vector, Hashtable, and TimerTask as opposed to their modern equivalents.

RufflesRidge 10-02-2014 23:42

Re: What Version of Java is It?
 
FRC Java uses the Squawk JVM which is based on a fairly old version of Java ME. Enums are one of the many things missing. If you dig into some of the WPILib classes you will see one way to hack something similar to an enum (the Mode class in Counter.java is an example).

Joe Ross 11-02-2014 01:29

Re: What Version of Java is It?
 
The 2015 roboRIO will be using Java SE Embedded.


All times are GMT -5. The time now is 09:30.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi