Log in

View Full Version : Eclipse library build errors


rthinman
16-08-2011, 03:06
Hello,

I installed Eclipse (3.7 Indigo) on our Windows 7 development computer. I think I was able to install the FRC Eclipse plug-in on the second try (first try I forgot to check the box and it didn't install everything). So now I have the help files, I can create a sample project, etc. I pointed the plug-in to the JRE that corresponds to the JDK (version 6 update 26) I loaded beforehand, and that is the default. I put our team number into the preferences page for FRC.

But, I noticed after putting in the team number that there were errors in the console window, something about not building. Similarly, when I open an example project, errors show up in the "problems" window, in the console, and I have errors flagged in the source (can't import the WPI library). It seems that the WPILib does not compile, thus there are no class files.

If you are interested, here is what it says in the console window, though it doesn't tell me much about why the build failed.


-do-compile:
[mkdir] Created dir: C:\eclipse\plugins\edu.wpi.first.javadev.sunspotfr csdk_1.0.6.6\sunspotfrcsdk\lib\WPILibJ\build
[javac] Compiling 126 source files to C:\eclipse\plugins\edu.wpi.first.javadev.sunspotfr csdk_1.0.6.6\sunspotfrcsdk\lib\WPILibJ\build

BUILD FAILED

C:\eclipse\plugins\edu.wpi.first.javadev.sunspotfr csdk_1.0.6.6\sunspotfrcsdk\install.xml:169: The following error occurred while executing this line:
C:\eclipse\plugins\edu.wpi.first.javadev.sunspotfr csdk_1.0.6.6\sunspotfrcsdk\lib\WPILibJ\build.xml:4 3: The following error occurred while executing this line:
C:\eclipse\plugins\edu.wpi.first.javadev.sunspotfr csdk_1.0.6.6\sunspotfrcsdk\ant\compile.xml:48: Error running javac.exe compiler


Any ideas about what has gone wrong, and how to fix it? It is going to be difficult to code without the class files. Thanks in advance.
Rod

biojae
16-08-2011, 03:24
C:\eclipse\plugins\edu.wpi.first.javadev.sunspotfr csdk_1.0.6.6\sunspotfrcsdk\ant\compile.xml:48: Error running javac.exe compiler


Any ideas about what has gone wrong, and how to fix it?

It looks like it can't find the java compiler (javac.exe).

Do you have the java JDK installed (not just the runtime? (JRE))?
Do you have your Java installation in your %PATH% system variable?

If those are configured properly, then I don't know.
That is a very un-specific error, though it is likely not a syntax error due to there not being a line number in a .java file.

sakekasi
16-08-2011, 15:32
got to Window --> preferences --> Java --> Installed JREs and add your jdk there.

rthinman
18-08-2011, 23:41
Success!

I already had the JDK installed on the PC, I had already added its JRE to Eclipse's preferences.

The critical piece was the PATH variable. Thanks!

nealpatel
24-08-2011, 22:29
What do you mean by %PATH% variable? I'm having the same issue and I do have the JDK installed.


EDIT: Never mind, Eclipse was pointing to JRE instead of the JDK, build works fine now!

By any chance, could anyone help with with Eclipse showing "The import edu cannot be resolved" when making new FRC Simple Project. I installed http://first.wpi.edu/FRC/java/eclipse/update/stable/ and followed http://grantgumina.boldlygoingnowhere.org/blog/?p=61


Any help would be appreciated!