Problems Developing MRL

I am trying to develop some new services, one for the Snowboy wakeword engine (only supported on Linux currently), and one for Amazon Alexa. I have the basic idea, but am having problems getting mrl setup in Eclipse. After I clone the project and I try to run it, Eclipse says "Cannot find or load main class org.myrobotlab.service.Runtime". I've tried adding the bin directory to the runtime classpath, but that only causes complaints about not being able to find the libraries in the repo, which I have alson cloned. This problem occurs on multiple computers, but I have succeeded using the same steps on older versions of MRL. I would love some help figuring this out so I can begin contributing!

kwatters's picture

MyRobotLab and Repo projects

You should clone both the "myrobotlab" and the "repo" projects from github.

then load the "repo" project into eclipse..

then load the "myrobotlab" project into eclipse

The MyRobotLab project depends on the Repo project for additional libraries required to make the services work.

Good luck!  Let us know how it goes!

Oh also..you might want to check out both of the projects to the "develop" branch... 

AutonomicPerfectionist's picture

Potential Causes

I currently have both MRL and the repo cloned and imported, and I have left the .classpath and .project files alone. In previous versions of MRL that I ran on Windows, this was enough to get it working. This time, I am trying to develop on Ubuntu 16.04, the first time I have tried working on MRL on a Linux computer. I looked at the .classpath file, and it seems to use Windows file separators. Would this make any difference, or would Eclipse automatically translate them using File.seperator? I recently cloned and ran mrl on Windows successfully using the exact same steps about a month ago, so the only possible cause I see is a difference in OS. Have any of the others managed to run MRL on Ubuntu? In addition, I tried switching to the develop branch, and the problem still persists.

Thanks for your help

kwatters's picture

build path problems?

The checked in .project / .classpath files should work for you.

Are you getting build path errors?

If so what sort of errors are you getting?   (clearly you won't be able to run Runtime until your build path is squared away.)

If the error is a build path issue.. see if you can fix them.. maybe it's just a file separator issue with the \ vs / 

A simple search & replace in the .classpath file should be sufficient for that.  

I am also assuming you're importing as an existing project.. not a new one.. right?

And just to validate, you've got Java 7 or newer installed? and eclipse is using a java 7 or higher build setting.. 

AutonomicPerfectionist's picture

Solution!

After trying everything I could think of and everything in these comments, the problem still persisted. For whatever reason, myrobotlab.org is blocked on my school's internet, so I had to search around elsewhere until I could get back home. I asked around on Stack Overflow and came across the suggestion to delete the .metadata directory in my eclipse workspace. After doing that and reimporting the projects, mrl worked just fine! Thanks for your help! Now, time to get developing... :)

AutonomicPerfectionist's picture

Solution!

After trying everything I could think of and everything in these comments, the problem still persisted. For whatever reason, myrobotlab.org is blocked on my school's internet, so I had to search around elsewhere until I could get back home. I asked around on Stack Overflow and came across the suggestion to delete the .metadata directory in my eclipse workspace. After doing that and reimporting the projects, mrl worked just fine! Thanks for your help! Now, time to get developing... :)