How to run a leJOS Projekt on ev3dev

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

Moderators: roger, gloomyandy, skoehler

Mauskrieger
New User
Posts: 1
Joined: Thu Apr 12, 2018 7:21 pm

How to run a leJOS Projekt on ev3dev

Postby Mauskrieger » Tue May 01, 2018 2:59 pm

Hello every one,
I have to run a Java Programm , created with BlueJ, on a EV3 brick.
I can only compile with Java 8 (not lower), so i can not use the lejos software on the brick (it runs with java 7).
I have installed the ev3dev Debian Jessie and the jdk8 on the brick and i use Putty and winscp to connect to the brick.
My question is, how can i get the ev3dev class library and how can i run a java program (lejos compatible) on the brick.
I hope someone can help me :idea: , i have already waste 30 hours on that thing :shock: .
Thanks for spending time for me.

User avatar
esmetaman
Advanced Member
Posts: 377
Joined: Wed Sep 13, 2006 12:16 am
Location: UK, Milton Keynes
Contact:

Re: How to run a leJOS Projekt on ev3dev

Postby esmetaman » Wed May 02, 2018 8:52 am

Good morning @Mauskrieger,

It is pretty interesting if you are using BlueJ with the project.
The another approach that exist is this Template project.
https://github.com/ev3dev-lang-java/tem ... ect_gradle

Template project offer a Ready to run project based on Gradle with some extra Gradle Tasks which help in the process to deploy & run the fatjar, kill java processes, test the remote connection and other stuff. In the future, I will create a Maven Template project too. :)

Maybe with your experience with BlueJ, we could add that support too. Congratulations!!! :D

In your case, you will have to download the latest Debian Jessie library from this Maven repository:
https://jitpack.io/#ev3dev-lang-java/ev3dev-lang-java
https://jitpack.io/com/github/ev3dev-la ... -0.7.0.jar

and deploy on the path where exist your java class.

once you have in the path for example:

Code: Select all

/path/
/path/MyExample.class
/path/ev3dev-lang-java-0.7.0.jar


Try to follow this answer:
https://stackoverflow.com/questions/219 ... -classpath

Code: Select all

java -cp "Test.jar:lib/*" my.package.MainClass


In relation to the time that you have invested to have everything is so much.
Take a look the documentation that we have:
http://ev3dev-lang-java.github.io/docs/ ... ng-started

If you think that the section about Windows is poor, you could contribute with a Pull Request on this repo:
https://github.com/ev3dev-lang-java/docs

Related issues:
https://github.com/ev3dev-lang-java/ev3 ... issues/407

We could add a new section with the usage of Putty and Winscp and the Scenario with BlueJ.

Normally, the time to install everything is:

Install OS: http://www.ev3dev.org/docs/getting-started/
- Download Debian image: Few minutes
- Download and Install Etcher: Few minutes
- Format MicroSD: Few minutes
- Install Debian image on MicroSD with Etcher: 10 minutes

Install JVM:
- If you install Oracle JRE 8: 1h.

The whole process is covered here:
http://ev3dev-lang-java.github.io/docs/ ... ng-started

But if you have problems, maybe it is necessary to review again in detail. Any comment is welcome.

Added issue:
https://github.com/ev3dev-lang-java/ev3 ... issues/488

Juan Antonio
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://ev3dev-lang-java.github.io/#/
https://github.com/jabrena/livingrobots

User avatar
esmetaman
Advanced Member
Posts: 377
Joined: Wed Sep 13, 2006 12:16 am
Location: UK, Milton Keynes
Contact:

Re: How to run a leJOS Projekt on ev3dev

Postby esmetaman » Sat May 19, 2018 12:01 pm

Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://ev3dev-lang-java.github.io/#/
https://github.com/jabrena/livingrobots


Return to “EV3 Software”

Who is online

Users browsing this forum: No registered users and 1 guest