Lejos NXT ClassFormatException

88 Views Asked by At

Im trying to upload my script from my laptop to my NXT Bot. Connectinng to NXT using wire. When I press the Run as NXT button i get the following error:

js.tinyvm.TinyVMException: Invalid byte tag in constant pool: 15
 ....  
Caused by: org.apache.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 15
Linking the file failed with exit status 1

I looked at similar problems but they had a problem with queing which my code does not use. Code I'm using:

  public class move {

   public static void main() {

   Motor.B.setSpeed(300);
   Motor.A.setSpeed(720);// 2 RPM
   Motor.C.setSpeed(720);


   Motor.A.forward();
   Motor.C.forward();
   Motor.B.rotateTo(90);
   Delay.msDelay(1000);
   Motor.A.stop();
   Motor.C.stop();
   Motor.B.rotateTo(-90);
   Delay.msDelay(1000);
   Motor.A.rotate( 90);
   Motor.C.rotate(90);


 }

} 
1

There are 1 best solutions below

0
On

Problem was occuring because my JDK was 1.8 and NXT required a 1.7 version of JDK