Are these the right sources/docs?

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

Are these the right sources/docs?

Postby ksattic » Sun Jan 12, 2014 11:52 pm

I'm not having much luck compiling my first program with leJOS. Are these the right instructions and sources to use?

http://sourceforge.net/p/lejos/wiki/Dev ... h%20leJOS/
git://git.code.sf.net/p/lejos/ev3

Using Eclipse Kepler, the instructions differ quite early from the actual experience.

5. Ensure that the branch is set to the tag name for the version of leJos you are using, e.g. 0.5.0-alpha, and click next.


I can't see how to choose this branch name in Eclipse. The only branches available are:

    master
    newport
    sensorframework

Executing "git tag" from the command line, I can see that there is a 0.5.0-alpha tag. I checked out this tag from the command line.

8. You should now see a list of projects that you can import. Deselect any projects that you do not require, you must have the "ev3classes" project, others are optional. Click finish.


Looks like DBusJava isn't optional, so I also imported that. In addition, I grabbed EV3HelloWorld and then continued with the instructions.

To build the program and copy it to to the EV3, make sure your EV3 is switched on, and then right-click on buil.xml, and select Run As, and then Ant Build. This should compile your program, package it as a runnable jar file and copy it to the EV3.


I get multiple errors when building. They are all from javac and they all are about missing packages and symbols, e.g.:

.../ev3/EV3HelloWorld/src/EV3HelloWorld.java:1: package lejos.hardware does not exist
[javac] import lejos.hardware.Button;
ksattic
New User
 
Posts: 6
Joined: Sat Jan 11, 2014 10:40 pm

Re: Are these the right sources/docs?

Postby lawrie » Mon Jan 13, 2014 11:57 pm

You need to make sure that dbusjava,jar and ev3classes.jar have been built by running the ant build file in their projects. You then need to make sure that the lib.dir property in the ant build file of EV3FirstProgram points to the location of the ev3classes and dbusjava projects. The errors should then be fixed.
lawrie
leJOS Team Member
 
Posts: 837
Joined: Mon Feb 05, 2007 1:27 pm

Re: Are these the right sources/docs?

Postby ksattic » Tue Jan 14, 2014 3:19 pm

lawrie wrote:You need to make sure that dbusjava,jar and ev3classes.jar have been built by running the ant build file in their projects. You then need to make sure that the lib.dir property in the ant build file of EV3FirstProgram points to the location of the ev3classes and dbusjava projects. The errors should then be fixed.


Thanks, that helps. I actually found some previous responses in the forum that answered my question. Initially I found nothing because the search was returning no results for my queries - I think because it discards query strings that contain words with <4 chars. I eventually found the answer by browsing seemingly unrelated threads.

I would happily update the wiki if possible!
ksattic
New User
 
Posts: 6
Joined: Sat Jan 11, 2014 10:40 pm

Re: Are these the right sources/docs?

Postby lawrie » Tue Jan 14, 2014 9:37 pm

I think the Wiki now says the two projects need to be built and that lib.dir may need to be changed.
lawrie
leJOS Team Member
 
Posts: 837
Joined: Mon Feb 05, 2007 1:27 pm


Return to EV3 Software

Who is online

Users browsing this forum: krchilders and 1 guest

more stuff