Installation of Lejos

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

Moderator: roger

Installation of Lejos

Postby stevendh » Fri Feb 09, 2007 5:13 pm

Hey guys...New to the forums here. I am doing a project at the University of Washington involving Lego Mindstorms. I saw an article that mentioned you can program the RCX brick in Java, which is very appealing to me. I have tried to follow the "Your First Brick" guide, but have run into some problems.

- I had to create the environment variables "LEJOS_HOME" and "RCXTTY"
Is this normal? The guide makes it sound like they should already be there.

-Also, when I try to run firmdl.bat to download the firmware to the RCX brick, I get the following error: Exception in thread "main" java.lang.NoClassDefFoundError:

However, I did put the classes into the CLASSPATH environment variable, so I don't know why it can't find the class definitions.

Any help would be greatly apprectiated, thanks.

Steven
stevendh
New User
 
Posts: 16
Joined: Fri Feb 09, 2007 5:08 pm

Postby stevendh » Fri Feb 09, 2007 5:42 pm

Also, I am using Windows XP w/ SP2 for reference.
stevendh
New User
 
Posts: 16
Joined: Fri Feb 09, 2007 5:08 pm

Postby stevendh » Fri Feb 09, 2007 7:30 pm

Ok, I figured out the problem. I only had the JRE, not a JDK. So, I downloaded JDK6 and quickly realized that this version is not compatible. So, I downloaded j2sdk-1_4_2_13-windows-i586-p.exe.

Now I can compile, however, I get the following error when I try to set up my RCX brick with the firmware "firmdl.bat":

Exception in thread "main" java.lang.NoClassDefFoundError

Here is my CLASSPATH: C:\Lejos\lib\classes.jar;C:\Lejos\lib\jtools.jar;C:\Lejos\lib\pcrcxcomm.jar;C:\Lejos\lib\rcxrcxcomm.jar;C:\Lejos\lib\vision.jar

Any suggestions?
stevendh
New User
 
Posts: 16
Joined: Fri Feb 09, 2007 5:08 pm

Postby bbagnall » Sat Feb 10, 2007 4:03 pm

stevendh wrote:Now I can compile, however, I get the following error when I try to set up my RCX brick with the firmware "firmdl.bat":

Exception in thread "main" java.lang.NoClassDefFoundError

Here is my CLASSPATH: C:\Lejos\lib\classes.jar;C:\Lejos\lib\jtools.jar;C:\Lejos\lib\pcrcxcomm.jar;C:\Lejos\lib\rcxrcxcomm.jar;C:\Lejos\lib\vision.jar

Any suggestions?

Usually you get that error when it isn't finding a jar file it needs. It looks like your classpath contains the required jars. Is your lib directory really in c:\Lejos?

BTW From your next message it sounds like you have made progress. What was the solution just in case other users encounter this?
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Postby stevendh » Sun Feb 11, 2007 9:31 pm

You are right, I've made so much progress by just tinkering around with everything. For those of you who are curious, my problem was the way I set up my environment variables. For example, I would put

LEJOS_HOME = C:\Lejos
and
CLASSPATH = C:\Lejos\lib\.....

instead of using the Lejos Home variable, like this:

LEJOS_HOME = C:\Lejos
and
CLASSPATH = %LEJOS_HOME%\lib\.....

By inserting the LEJOS_HOME variable into the classpath (as opposed to typing it all out) it fixed my problem.

~Steven~
stevendh
New User
 
Posts: 16
Joined: Fri Feb 09, 2007 5:08 pm


Return to RCX Software

Who is online

Users browsing this forum: No registered users and 2 guests

more stuff