running Lejos on eclipse

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

Moderators: roger, gloomyandy, skoehler

running Lejos on eclipse

Postby SnehaPuthani » Sat Nov 23, 2013 2:15 pm

I am new to Lejos. I recently got the mindstorms ev3 kit. Can I run the java program on eclipse ide to test whether the program is working fine or not. Because whenever I run the program I get the following error:
Exception in thread "main" java.io.IOError: java.io.FileNotFoundException: File: /dev/fb0 errno 0
at lejos.internal.io.NativeDevice.<init>(NativeDevice.java:27)
at lejos.hardware.LCD.<init>(LCD.java:437)
at lejos.hardware.LCD.<clinit>(LCD.java:450)
at EV3FirstProgram.main(EV3FirstProgram.java:10)
Caused by: java.io.FileNotFoundException: File: /dev/fb0 errno 0
at lejos.internal.io.NativeFile.open(NativeFile.java:113)
at lejos.internal.io.NativeDevice.<init>(NativeDevice.java:24)
SnehaPuthani
New User
 
Posts: 4
Joined: Sun Nov 17, 2013 10:55 pm

Re: running Lejos on eclipse

Postby Aswin » Sat Nov 23, 2013 3:24 pm

You cannot run java programs on the PC that use EV3 hardware like the LCD screen.
My NXT blog: http://nxttime.wordpress.com/
Aswin
leJOS Team Member
 
Posts: 187
Joined: Tue Apr 26, 2011 9:18 pm
Location: Netherlands

Re: running Lejos on eclipse

Postby pineal » Mon Nov 25, 2013 6:02 pm

HI, I met a similiar problem. The error code is here:

classpath: EV3FirstProgram.jar:/home/root/lejos/lib/ev3classes.jar:/home/root/le
jos/libjna/usr/share/java/jna.jar:.
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
LCD cannot be resolved
LCD cannot be resolved
Button cannot be resolved
LCD cannot be resolved
LCD cannot be resolved

at EV3FirstProgram.main(EV3firstProgram.java:7)

Is that mean I did't setup lejos well? Is the library not installed or linked well?
pineal
New User
 
Posts: 6
Joined: Mon Nov 04, 2013 9:29 pm

Re: running Lejos on eclipse

Postby gloomyandy » Mon Nov 25, 2013 6:15 pm

As Aswin has already said, you can't run a program that uses EV3 hardware (like the LCD) on your PC, you need to download the program and run it on the EV3...
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3645
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: running Lejos on eclipse

Postby cfin » Mon Nov 25, 2013 6:48 pm

pineal wrote:HI, I met a similiar problem. The error code is here:

classpath: EV3FirstProgram.jar:/home/root/lejos/lib/ev3classes.jar:/home/root/le
jos/libjna/usr/share/java/jna.jar:.
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
LCD cannot be resolved
LCD cannot be resolved
Button cannot be resolved
LCD cannot be resolved
LCD cannot be resolved

at EV3FirstProgram.main(EV3firstProgram.java:7)

Is that mean I did't setup lejos well? Is the library not installed or linked well?

This error comes during compilation of the programm. Perhaps, you are using the standard version of the example code against the current master branch. When the example code was posted, the Klasses had different packages. So either you use tha tagged git repository. See this forum for more informations or you replace the import with the correct ones. Eclipse can help you with that. But in this case, you also have to replace the ev3classes.jar on the device.

Perhaps Andy will soon release a new version, then this problem may go away.
cfin
New User
 
Posts: 15
Joined: Fri Oct 25, 2013 8:04 pm

Re: running Lejos on eclipse

Postby pineal » Mon Nov 25, 2013 8:32 pm

Thanks buddy!
I replace it with the latest commit.
I am doing my Final Year Project, and quite confused with the leJOS with EV3 sometimes.
But things are going well thanks for your guys help and useful information!
I hope I can share my project after I achieve it! :mrgreen:
pineal
New User
 
Posts: 6
Joined: Mon Nov 04, 2013 9:29 pm

Re: running Lejos on eclipse

Postby SnehaPuthani » Mon Nov 25, 2013 11:32 pm

gloomyandy wrote:As Aswin has already said, you can't run a program that uses EV3 hardware (like the LCD) on your PC, you need to download the program and run it on the EV3...


Thank you.I will try running the program on EV3.
SnehaPuthani
New User
 
Posts: 4
Joined: Sun Nov 17, 2013 10:55 pm


Return to EV3 Software

Who is online

Users browsing this forum: No registered users and 2 guests

more stuff