Folder 'programs' not visible via ssh

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

Moderators: roger, gloomyandy, skoehler

Folder 'programs' not visible via ssh

Postby kao1o » Wed Jun 25, 2014 8:11 am

Hi,

i'm trying to use the web browser-control : http://thinkbricks.net/?p=870
but when i try to upload and start the programs in the terminal, i cant find a folder named 'programs'.
even with the command ls -aR i cant find the folder or any program that should be there.
Is it possible that the folder is not visible? And how can i change it?

Thank You
kao1o
New User
 
Posts: 4
Joined: Wed Jun 25, 2014 8:00 am

Re: Folder 'programs' not visible via ssh

Postby gloomyandy » Wed Jun 25, 2014 1:39 pm

Hi and welcome to leJOS. I can't really answer your question directly without more information....
* What version of leJOS are you running?
* How did you upload the programs you are looking for?
* Can you see the programs from the menu? If so under which category?
* What locations are you looking in when using ssh? By default you will be in the /home/root directory, user programs are usually stored in /home/lejos/programs.
* You can see where the menu is looking for the user programs code by browsing the menu source:
https://sourceforge.net/p/lejos/ev3/ci/ ... artup.java
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4042
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Folder 'programs' not visible via ssh

Postby kao1o » Thu Jun 26, 2014 9:48 am

Hi,

my lejos-version is 0.8.1-beta.
we uploaded the programs with the eclipse 'run as lejos EV3 program' command.
I can see them in the menu under 'programs' and can start them there.
the problem could really be that I'm in the wrong folder. But I'm not really used to unix-commands, how can i change to a higher level than my root folder?
kao1o
New User
 
Posts: 4
Joined: Wed Jun 25, 2014 8:00 am

Re: Folder 'programs' not visible via ssh

Postby gloomyandy » Thu Jun 26, 2014 10:09 am

I think you need to find a good Linux tutorial if you are going to do this sort of thing. Try
cd /home/lejos
you should see various folders there including programs.
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4042
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Folder 'programs' not visible via ssh

Postby kao1o » Thu Jun 26, 2014 11:44 am

ok thank you, that part is working now.
but when i start the program SimpleWebServer.jar i get:

Exception in thread "main" java.lang.NoClassDefFoundError: lejos/robotics/RegulatedMotor
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getMethod0(Class.java:2774)
at java.lang.Class.getMethod(Class.java:1663)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: lejos.robotics.RegulatedMotor
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more
kao1o
New User
 
Posts: 4
Joined: Wed Jun 25, 2014 8:00 am

Re: Folder 'programs' not visible via ssh

Postby gloomyandy » Thu Jun 26, 2014 12:15 pm

Sigh, please when asking questions tell us as much as you can, it makes it so much easier to help you...

So how are you trying to run your program? if you are running from the command line what is the command you have typed? Did you rebuild that jar yourself? If so how? Did you use the same version of the leJOS jar files when you compiled as you have installed on the EV3?
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4042
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Folder 'programs' not visible via ssh

Postby kao1o » Thu Jun 26, 2014 1:26 pm

I'm just following the instructions on http://thinkbricks.net/?p=870.
so i run the program with: jrun -jar SimpleWebServer.jar -h YOURIPADDRESS -d /home/lejos/programs/www
and i used the "run as Ant build" on the web server_build.xml

Code: Select all
<?xml version="1.0" encoding="ISO-8859-1"?>
    <project name="SimpleWebServer" basedir="." default="copy">
    <property name="source.dir"     value="src"/>
    <property name="lib.dir"        value="../ev3classes"/>
    <property name="class.dir"      value="build"/>
    <property name="jar.dir"        value="dist"/>
    <property name="main-class"     value="fi.iki.elonen.SimpleWebServer"/>
    <property name="lejos.home"     value="/home/root/lejos"/>
    <property name="ev3.host"       value="192.168.1.32"/>

    <path id="libraries.path">   
        <fileset dir="${lib.dir}">
            <include name="*.jar"/>
        </fileset>
    </path>

    <target name="clean" description="delete old files">
        <delete dir="${class.dir}"/>
        <delete dir="${jar.dir}"/>
    </target>

    <target name="compile" description="build class files" depends="clean">
        <mkdir dir="${class.dir}"/>
        <javac srcdir="${source.dir}" destdir="${class.dir}">
            <classpath refid="libraries.path"/>
        </javac>
    </target>

    <target name="jar" depends="compile">
        <mkdir dir="${jar.dir}"/>
        <jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${class.dir}">
            <manifest>
                <attribute name="Main-Class" value="${main-class}"/>
                <attribute name="Class-Path" value="${lejos.home}/lib/ev3classes.jar ${lejos.home}/libjna/usr/share/java/jna.jar"/>
            </manifest>
        </jar> 
    </target>

    <target name="copy" depends="jar">
       <scp todir="root:@${ev3.host}:/home/lejos/programs/" trust="true">
           <fileset file="${jar.dir}/${ant.project.name}.jar"/>
       </scp>
    </target>
</project>


the only thin i changed in that file was the IP-adress and the {lejos.home} value to where my lejos is located.
the lejos versions are 0.8.1-beta on the brick and in eclipse.
kao1o
New User
 
Posts: 4
Joined: Wed Jun 25, 2014 8:00 am

Re: Folder 'programs' not visible via ssh

Postby gloomyandy » Thu Jun 26, 2014 1:50 pm

You should not be changing lejos.home, that is the location on the EV3 of the various leJOS libraries. Why did you change that?
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4042
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK


Return to EV3 Software

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff