I have edited myrobotlab's source code,and what can I do to make it to runnable jar

I use eclipse to develop,and I use eclipse to export it to runnable jar like this:

and I get a test.jar. I use "java -jar test -service gui GUIService" to run it in cmd.Then I get this problem:

but I can run it in eclipse smoothly,

and my dir is that:

and what should I do?then I can get a runnable jar

GroG's picture

Hello and Welcome Maiff

Hello and Welcome Maiff !

Cool font ! ;)

Make a jar is easy .. find build.xml, press F11 and it will build you a jar.

Thanks for the pictures ...

Hopefully, this one will help you.

Mats's picture

Build locally

I didn't know about that. Thanks :)

To make it work in my installation, I also had to install git


And I also had to set the JAVA_HOME envronment variable to make the build find the SDK.



That's great becasue now I can test on my RasPi without having to push untested changes.

I should have asked how to do that long time ago :) 

Thanks Maiff for asking this question, and thanks GroG for a very good answer :-)

kwatters's picture

Build from the command line...

If you want to build it the same way that TravisCI builds it.

Dowload "Apache Ant"   (I use version 1.8.2.)  


Unzip it, and add the the directory to your PATH environment variable (so you can find it easy on the command line.)

Change into the myrobotlab directory and run the following:

cd myrobotlab

ant clean dist

that should produce a myrobotlab.jar file for you if everything compiles properly and the unit tests pass.


Mats's picture

Thanks Kevin

I tried it and it works fine. The build hosting seems to be on a powerful machine. The build when I push a change takes about 4-5 minutes. On my old laptop about 30 minutes .....