To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.javaOpen lugnet.robotics.rcx.java in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / Java / *380 (-20)
Subject: 
Re: lejos help please
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Sat, 8 Jul 2006 00:40:03 GMT
Viewed: 
10533 times
  
In lugnet.robotics.rcx.java, Muhammad Arif Abdul Rahman wrote:

I tried to follow the tutorial as close as I can, but I might have made some
mistakes. I did set up the classpath, but I guess there are some mistakes there.
Is there any way I can check what is in the classpath? Or shall I just redo the
setup?

Well, now that I look over the instructions on leJOS, I see that they don't say
to set classpath.  I think I always have, however.  I haven't installed it on my
newish laptop, though, so I can't check.

Does someone with more experience want to field this one?

I guess there's no harm in trying to add it.  Just to see if this works, you
could type it into the command line before trying to compile.  It goes something
like
SET CLASSPATH=%CLASSPATH%;.;c:\lejos\classes\

and then try running lejosc to compile your program.  See notes below for what
it's doing, but make sure that c:\lejos\classes\ points to the classes folder
installed as part of lejos.  If you put it someplace other than c:\lejos, you'll
need to modify this.

If it works, once you close the command prompt window, you'll need to do it
again in the next one.  I keep a batch file of these things, so I can set
several things at once without having to remember them.

If this works and you want to set it for your system, depending on your version
of Windows:
*Go to Control Panel
*Choose System
*Click the Advanced tab
*Click the Environment Variables tab
*Look for CLASSPATH--the Java installation probably added one.  If so, you can
click the EDIT button and change it; if not, you can click the NEW button and
add an environment variable named CLASSPATH.
*If you already have a classpath, add ;.;C:\lejos\classes\

The first semicolon is to separate . from the preceding entry;  . is the
directory you're in when you compile [if it's already in there, you don't need
to re-add it], and c:\lejos\classes\ is the path to the classes folder installed
with leJOS--modify as necessary to reflect your setup.  You should already have
the path for the Java install in your classpath--if you don't, I think you would
have gotten more errors than you actually did.

Let me know if this works.

Peter


Subject: 
Re: lejos help please
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Thu, 6 Jul 2006 08:47:56 GMT
Viewed: 
10126 times
  
In lugnet.robotics.rcx.java, Peter F. Guenther wrote:
In lugnet.robotics.rcx.java, Muhammad Arif Abdul Rahman wrote:
Hi all,

I'm trying lejos for the first time, but i cant get it working. i followed the
tutorial on the lejos homepage.
when i tried to compile motion.java, 9 errors come up with the first one saying
that package josx.vision does not exist. this is what i got:

Motion.java:1: package josx.vision does not exist

My lejos book is at school, but my first question would be, have you set up your
classpath correctly?  If josx.vision is a real thing, you shouldn't get that
first error.

Peter

Hi Peter,
I tried to follow the tutorial as close as I can, but I might have made some
mistakes. I did set up the classpath, but I guess there are some mistakes there.
Is there any way I can check what is in the classpath? Or shall I just redo the
setup?
Thanks


Arif


Subject: 
Re: lejos help please
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Thu, 6 Jul 2006 03:05:29 GMT
Viewed: 
9495 times
  
In lugnet.robotics.rcx.java, Muhammad Arif Abdul Rahman wrote:
Hi all,

I'm trying lejos for the first time, but i cant get it working. i followed the
tutorial on the lejos homepage.
when i tried to compile motion.java, 9 errors come up with the first one saying
that package josx.vision does not exist. this is what i got:

Motion.java:1: package josx.vision does not exist

My lejos book is at school, but my first question would be, have you set up your
classpath correctly?  If josx.vision is a real thing, you shouldn't get that
first error.

Peter


Subject: 
lejos help please
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Wed, 5 Jul 2006 23:25:36 GMT
Viewed: 
9492 times
  
Hi all,

I'm trying lejos for the first time, but i cant get it working. i followed the
tutorial on the lejos homepage.
when i tried to compile motion.java, 9 errors come up with the first one saying
that package josx.vision does not exist. this is what i got:

Motion.java:1: package josx.vision does not exist
import josx.vision.*;
^

Motion.java:3: cannot resolve symbol
symbol : class MotionListener
location : class Motion
public class Motion implements MotionListener {
                               ^
... and another 7 cannot resolve symbol errors similar to the second one.

can anybody points out why this is happening? is there anything i missed out
while installing the whole thing? or is it the arrangement of the files in my
lejos folder?

please help if you know the solution.
thanks.


arif


Subject: 
navigator class
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Thu, 1 Jun 2006 16:05:44 GMT
Viewed: 
8952 times
  
Hi!

I'm controlling my robot with the navigator class. For my recent visual servoing
project I need to stop the current travel command and call it once again with
new distance information. The old movement should be stopped and the new one
started.

The travel method normally returns when the movement is stopped. So how can i
stop the travel method before the movement is completed.
Would be great if you could help me.


christian


Subject: 
Java on the NXT
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Wed, 8 Mar 2006 07:17:51 GMT
Viewed: 
7618 times
  
I got lucky and now have a NXT on my desk, thanks to the MDP.  Now is a good
time to make suggestions for the API of the NXT lejos.
Roger Glassey


Subject: 
AW: lejos program terminating immediately
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Thu, 11 Aug 2005 08:59:25 GMT
Reply-To: 
<JOCHEN.HILLER@TOP-LOGIC.COMsaynotospam>
Viewed: 
6438 times
  
Hi Jason,

you have to loop within your main program, otherwise main() will be left.

E.g. use
while (true) {
Thread.sleep (1000);
}

or, use a button listener, and exit when some button has been pressed.

HTH, Jochen


-----Ursprüngliche Nachricht-----
Von: news-gateway@lugnet.com [mailto:news-gateway@lugnet.com]Im Auftrag
von JasonQ
Gesendet: Mittwoch, 10. August 2005 17:11
An: lugnet.robotics.rcx.java@lugnet.com
Betreff: lejos program terminating immediately


Hi,

I'm trying to use leJOS to display the current value of the
rotation sensor I
have hooked up to Sensor Port 1, but when I run the program, the
RCX just beeps
and ends the program immediately.  Here's my code:



import josx.platform.rcx.*;

public class Rot_test
{
    public static void main (String[] args) throws Exception
    {
        Sensor.S1.setTypeAndMode (SensorConstants.SENSOR_TYPE_ROT,
SensorConstants.SENSOR_MODE_ANGLE);
        Sensor.S1.addSensorListener(new SensorListener() {
            public void stateChanged(Sensor aSource, int aOldValue, int
aNewValue){
                LCD.clear();
                Integer i = new Integer(aNewValue);
                String s = i.toString();
                TextLCD.print(s);
            }
        });
        Sensor.S1.activate();
    }
}




I have a question about leJOS that may be related to this (and I
think it may
have to do with the problem I'm having).  When a leJOS program is
set up, and
the program finishes executing all of the code in the main(String[] args)
method, does the program just end?

I think the problem with my code may be that I set up the
listeners, but after
the program finishes reading all of the code in the method, it
just exits and
never watches the rotation sensor.



Does anyone know why I'm having this problem or what it is?


Thanks,

Jason


Subject: 
lejos program terminating immediately
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Wed, 10 Aug 2005 15:10:31 GMT
Viewed: 
6341 times
  
Hi,

I'm trying to use leJOS to display the current value of the rotation sensor I
have hooked up to Sensor Port 1, but when I run the program, the RCX just beeps
and ends the program immediately.  Here's my code:



import josx.platform.rcx.*;

public class Rot_test
{
    public static void main (String[] args) throws Exception
    {
        Sensor.S1.setTypeAndMode (SensorConstants.SENSOR_TYPE_ROT,
SensorConstants.SENSOR_MODE_ANGLE);
        Sensor.S1.addSensorListener(new SensorListener() {
            public void stateChanged(Sensor aSource, int aOldValue, int
aNewValue){
                LCD.clear();
                Integer i = new Integer(aNewValue);
                String s = i.toString();
                TextLCD.print(s);
            }
        });
        Sensor.S1.activate();
    }
}




I have a question about leJOS that may be related to this (and I think it may
have to do with the problem I'm having).  When a leJOS program is set up, and
the program finishes executing all of the code in the main(String[] args)
method, does the program just end?

I think the problem with my code may be that I set up the listeners, but after
the program finishes reading all of the code in the method, it just exits and
never watches the rotation sensor.



Does anyone know why I'm having this problem or what it is?


Thanks,

Jason


Subject: 
Problem with LDT plugin
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Wed, 8 Jun 2005 18:46:22 GMT
Viewed: 
7357 times
  
Hi,

I’m starting with lejos and I try to use the plugin LDT 1.2.0 for Eclipse 3.0 with Windows XP. When I try to run (Run As > leJOS), I get the message :

An internal error occurred during: “Launching”. java.lang.IllegalArgumentException: Path must include project and resource name: /test_mind org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:58) org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:1515) org.eclipse.core.internal.resources.Container.getFile(Container.java:124) org.lejos.tools.eclipse.plugin.launch.RunDelegate.launch(RunDelegate.java:63) org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:569) org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:788) org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlugin.java:955) org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)

My classpath, path, lejos_home and RCXTTY are ok, commands like lejosjc, lejoslink and lejosdl work fine.

With Eclipse, I get the item leJOS > Install Firmware (which works), I can create leJOS RCX project, but I don’t succeed to run my program :(

I’ve surely missed something, and I find nothing about that.

If you can help me, it will be great :)

Erik “brickerik” Amzallag


Subject: 
[Ann] Jurtle 1.8 - Now with LeJOS support
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Tue, 17 May 2005 12:39:38 GMT
Viewed: 
6510 times
  
I would like to announce the release of Jurtle 1.8, a simple IDE for learning
programming in Java.

What makes this release pertinent to this group is that Jurtle now integrates
with the LeJOS tools and API for programming the LEGO Mindstorms Robotics
system. You can write, compile and download your Java code for the Mindstorms
robots all from within the Jurtle IDE.

For more information, or to download your fully functional evaluation copy,
visit the Otherwise web site at: <http://www.otherwise.com/Jurtle.html>

--
Bill Tschumy
Otherwise -- Austin, TX
http://www.otherwise.com


Subject: 
Re: Showing Strings on LCD
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Mon, 16 May 2005 18:05:59 GMT
Viewed: 
7397 times
  
Hi Armin,

"Armin Buttinger" <a.buttinger@t-online.de> writes:

I have a RCX and three Sensors. I want to have the three sensor-values on the
LCD-screen.
I had an idea: changing the sensor-integer-values in String, so
I have the 3 Values in a String I am showing on the LCD-screen.
But if I run this in an endless-loop, the program shut down.

why?

probably because it runs out of memory.

This is hard to avoid with strings, as Lejos doesn't garbage collect memory.
Either you generate too many strings, or you have an old version
of Lejos that is not careful enough in TextLCD.

To check if it was indeed out of memory you can look
which exception was raised, look in the README for instructions.


Jürgen

--
NO to software patents -- stop the European patents directive

Jürgen Stuber <juergen@jstuber.net>
http://www.jstuber.net/
gnupg key fingerprint = 2767 CA3C 5680 58BA 9A91  23D9 BED6 9A7A AF9E 68B4


Subject: 
Re: Showing Strings on LCD
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Mon, 9 May 2005 14:21:51 GMT
Viewed: 
7284 times
  
In lugnet.robotics.rcx.java, Armin Buttinger wrote:
I have a RCX and three Sensors. I want to have the three sensor-values on the
LCD-screen.
I had an idea: changing the sensor-integer-values in String, so
I have the 3 Values in a String I am showing on the LCD-screen.
But if I run this in an endless-loop, the program shut down.

why?

Can somebody help me?

Can you post your source code (or the relevant bits at least)?

Thomas


Subject: 
Showing Strings on LCD
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Sun, 8 May 2005 21:31:22 GMT
Viewed: 
7338 times
  
I have a RCX and three Sensors. I want to have the three sensor-values on the
LCD-screen.
I had an idea: changing the sensor-integer-values in String, so
I have the 3 Values in a String I am showing on the LCD-screen.
But if I run this in an endless-loop, the program shut down.

why?

Can somebody help me?


Subject: 
Re: urgent! lejos run error
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Fri, 1 Apr 2005 15:41:02 GMT
Viewed: 
7094 times
  
In lugnet.robotics.rcx.java, Chris Dodds wrote:
js.classfile.EClassFileFormat: Version not recognized: 46.0

http://news.lugnet.com/robotics/rcx/java/?n=365

Whenever you encounter a problem with LEGO robotics of any sort it is a very
good idea to search the Lugnet newsgroups before posting a question.  In this
case I searched for "version not recognized" and found a post that will probably
solve the problem for you.  If it doesn't then email or post again.

John Hansen


Subject: 
urgent! lejos run error
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Thu, 31 Mar 2005 10:04:39 GMT
Viewed: 
7490 times
  
Hi guys, im trying to get the Lejos vision package set up on
my computer for a university project. I've got the motion example that comes
with the package compiling but I'me still getting an error when I try to run it:

Exception reading josx/vision/Vision
js.classfile.EClassFileFormat: Version not recognized: 46.0
at js.classfile.JClassFile.readMagicAndVersions(JClassFile.java:226)
at js.classfile.JClassFile.read(JClassFile.java:255)
at js.tinyvm.ClassRecord.getClassRecord(ClassRecord.java:427)
at js.tinyvm.ClassRecord.storeReferredClasses(ClassRecord.java:217)
at js.tinyvm.Binary.processClasses(Binary.java:105)
at js.tinyvm.Binary.createFromClosureOf(Binary.java:258)
at js.tinyvm.TinyVM.main(TinyVM.java:109)
at js.tinyvm.TinyVM.main(TinyVM.java:100)
at js.tinyvm.TinyVM.main(TinyVM.java:216)
at js.tinyvm.TinyVM.main(TinyVM.java:250)

I'm not the best java man in the world so I'm not sure what it
means, I guess its a problem with the vision file in the package? If you could
suggest any ways to fix the problem I would be very grateful because
this is a very important piece of work and im running out of
time! Cheers. Chris.


Subject: 
Re: problem downloading
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Mon, 14 Mar 2005 19:54:36 GMT
Viewed: 
9102 times
  
Hi,

"tata sharfi" <tata802@hotmail.com> writes:

js.classfile.EClassFileFormat: Version not recognized: 46.0

this means that the class files are in a newer format that Lejos
cannot use, so the compiler needs a '-target 1.1' option
(with Java 1.5 you may also need '-source 1.2').
It seems your Lejos version is rather old,
the current ones put the -target option there automatically.
I'd recommend 2.1.0 for MS-Windows or CVS for Linux.


Cheers

Jürgen

--
NO to software patents -- stop the European patents directive

Jürgen Stuber <juergen@jstuber.net>
http://www.jstuber.net/
gnupg key fingerprint = 2767 CA3C 5680 58BA 9A91  23D9 BED6 9A7A AF9E 68B4


Subject: 
problem downloading
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Wed, 9 Mar 2005 20:23:41 GMT
Viewed: 
8403 times
  
hi ....
i have a problem downloading my java programs to the RCX, they don't give any
errors when compiling them using the lejosc command, but when trying to use the
lejos command i get this error :

Exception reading Test
js.classfile.EClassFileFormat: Version not recognized: 46.0
at js.classfile.JClassFile.readMagicAndVersions(JClassFile.java:226)
at js.classfile.JClassFile.read(JClassFile.java:255)
at js.tinyvm.ClassRecord.getClassRecord(ClassRecord.java:427)
        at js.tinyvm.Binary.processClasses(Binary.java:91)
        at js.tinyvm.Binary.createFromClosureOf(Binary.java:258)
        at js.tinyvm.TinyVM.main(TinyVM.java:109)
        at js.tinyvm.TinyVM.main(TinyVM.java:100)
        at js.tinyvm.TinyVM.main(TinyVM.java:217
        at js.tinyvm.TinyVM.main(TinyVM.java:251)


thx for any help or ideas


Subject: 
Re: communication with USB on Linux
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Sun, 13 Feb 2005 18:13:23 GMT
Viewed: 
9117 times
  
Does CVS work with my 2.4.26 kernel as well?

Probably not.

So, unless I move to the 2.6.10 kernel and CVS leJOS, there's little to no
chance I'll get the desired bi-directional communication with the USB tower
working.


Subject: 
Re: communication with USB on Linux
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Sun, 13 Feb 2005 16:27:39 GMT
Viewed: 
8975 times
  
"Huub van Niekerk" <v.niekerk@freeler.nl> writes:
In lugnet.robotics.rcx.java, Juergen Stuber wrote:

You can also get it working with the CVS version of Lejos
and a Linux kernel >= 2.6.7, which includes the newest driver.

Does CVS work with my 2.4.26 kernel as well?

Probably not.

Should I remove the 'old' leJOS version first?

You can keep it, just install the new one in a different directory
and make sure you don't use the old one (change LEJOS_HOME and PATH).


Jürgen

--
NO to the planned nodding through of the EU software patent directive!

Jürgen Stuber <juergen@jstuber.net>
http://www.jstuber.net/
gnupg key fingerprint = 2767 CA3C 5680 58BA 9A91  23D9 BED6 9A7A AF9E 68B4


Subject: 
Re: communication with USB on Linux
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Sun, 13 Feb 2005 13:22:15 GMT
Viewed: 
8832 times
  
Hi Juergen,

Thank you for your answer. Some questions though:

In lugnet.robotics.rcx.java, Juergen Stuber wrote:
Hi Huub,

"Huub van Niekerk" <v.niekerk@freeler.nl> writes:

For some time I've been trying to get bi-directional communication using:
- Slackware Linux 10.0
- leJOS 2.1.0
- USB IR-tower
- RCX 2.0

So far I've managed to upload leJOS and the written software to the RCX.
However, when I try to run the software, I get this message: "no irtower in
java.library.path". I've set the classpath to the directories involved with
Java, leJOS.

have you run make?


Yes, I did. That solved some problems.

Can somebody please tell me if it is anyway possible to get a bidirectional
communication between my pc running Slackware and an USB IR-tower?

You can also get it working with the CVS version of Lejos
and a Linux kernel >= 2.6.7, which includes the newest driver.


Does CVS work with my 2.4.26 kernel as well? Should I remove the 'old' leJOS
version first?

To get and install Lejos from CVS do

$ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/lejos login
$ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/lejos co -P lejos
$ cd lejos
$ make

The driver module should be loaded:
$ lsmod | grep lego
legousbtower           15360  0

There should be a device node for the USB tower
(if you have udev this will be created when you plug in the tower):
$ ls -l /dev/usb/legousbtower*
crw-rw-rw-  1 root root 180, 160 2005-02-12 21:39 /dev/usb/legousbtower0

Set RCXTTY to /dev/usb/legousbtower0

You should now be able to use it,
use lejosjc, lejoslink, lejosdl and firmdl from the bin directory.
(some options may have changed).

Since you want to do communication, take a look at examples/comms
(the Makefiles need also some updating).


Hope this helps

Jürgen

Thanks

Huub



Next Page:  5 more | 10 more | 20 more

Redisplay Messages:  Brief | Compact

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR