I have a problem using Enums with lejos. I also found an post with a similar question, but unfortunately it did not help.
I'm using Eclipse and I want to use Enums in my program but when I try to perform the lejos download it sais:
- Code: Select all
Error: Class java.lang.Enum (file java/lang/Enum.class) not found in CLASSPATH .;C:\ProgramFiles\lejos_nxj\3rdparty\lib\bcel-5.1.jar;C:\ProgramFiles\lejos_nxj\3rdparty\lib\commons-cli-1.0.jar;C:\ProgramFiles\lejos_nxj\lib\pctools.jar;C:\ProgramFiles\lejos_nxj\lib\pccomm.jar;C:\ProgramFiles\lejos_nxj\lib\jtools.jar;C:\ProgramFiles\lejos_nxj\3rdparty\lib\bluecove.jar;C:\ProgramFiles\lejos_nxj\lib\classes.jar
When I delete the Enum part in my code everythin works fine again.
I reconstrukted the programme with this simple example:
- Code: Select all
public class Main {
public static void main(String[] args) {
int speed = 10;
MyMotor motor1 = new MyMotor (speed, Orientation.LEFT);
}
}
public class MyMotor {
int speed;
Orientation orientation;
public MyMotor(int speed, Orientation orientation){
this.speed = speed;
this.orientation = orientation;
}
}
public enum Orientation {
LEFT, RIGHT;
}
When I switch on my NXT it shows on the display "25124 leJOS 7.4"
Sometimes it changes to "leJOS 7.5" on the display but just for one sec which ist really strange.
Thanks in advance
Phoen
