View Single Post
  #1   Spotlight this post!  
Unread 15-10-2012, 20:00
fishythefish fishythefish is offline
Programmer
FRC #1504 (The Desperate Penguins)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Okemos, MI
Posts: 2
fishythefish is an unknown quantity at this point
CAN Protocol/Missing .java and .class files

cRIOs are fairly expensive and we don't get new ones each year, so in order to continue demo-ing our old robots, we want to try to compile code into a JAR and run the program output through an Arduino or something instead. In particular, we want a standalone implementation of the CAN protocol so that we can at least run motors.

Since the cRIO doesn't do any of the work of compiling, it seems like it should be possible to extract the relevant source files from the SunSPOT FRC SDK and put them in a new vanilla Java project. However, nearly all the files from edu.wpi.blahblahblah end up importing from com.sun.blahblahblah and all the packages under com.sun are missing in sunspotfrcsdk/lib/wpilibj/src and their corresponding .class files are missing from sunspotfrcsdk/lib/wpilibj/build, so I can't even decompile them to get the actual source. (But everything does show up in javadoc.)

If I create a Simple Robot project using the Netbeans module, then I can import these missing classes, but if I navigate to source, Netbeans auto-generates the missing code instead since no source can be found. However, many of the the generated files are incomplete or incorrect, so they don't help. Adding the JAR files from the modules directory to classpath also does not help.

Has anyone tried messing with this, and if so, can they tell me where I can find the missing files or if there is a better solution?
Reply With Quote