import lejos.hardware.Bluetooth;
import lejos.hardware.motor.NXTMotor;
import lejos.hardware.sensor.AccelHTSensor;
import lejos.hardware.sensor.LightSensor;
import lejos.hardware.sensor.RCXLightSensor;
import lejos.hardware.sensor.TouchSensor;
import lejos.remote.nxt.NXTCommConnector;
import lejos.remote.nxt.RemoteNXT;
import lejos.remote.nxt.NXT;
import lejos.remote.nxt.RemoteNXTAnalogPort;
import lejos.utility.Delay;

public class NXTRemote {

	private static final String NXT = "00:16:53:12:92:AA";
	
	public static void main(String[] args) throws Exception {
		NXTCommConnector connector = Bluetooth.getNXTCommConnector();
		NXT nxt = RemoteNXT.get(NXT, connector);
		
		System.out.println("Battery voltage is " + nxt.getBattery().getVoltage());
		
		LightSensor light = new LightSensor(nxt.getPort("S1").open(RemoteNXTAnalogPort.class));
		
		RCXLightSensor rcxLight = new RCXLightSensor(nxt.getPort("S4").open(RemoteNXTAnalogPort.class));
		
		System.out.println("Light sensor : " + light.getLightValue());
		
		System.out.println("RCX Light sensor : " + rcxLight.getLightValue());

		TouchSensor touch = new TouchSensor(nxt.getPort("S2"));
		
		System.out.println("Touch sensor isPressed: " + touch.isPressed());
		
		AccelHTSensor accel = new AccelHTSensor(nxt.getPort("S3"));
		
		System.out.println("X acceleration: " + accel.getXAccel());
		
		NXTMotor m = new NXTMotor(nxt.getPort("A"));
		
		m.forward();
		
		m.setPower(50);;
		
		Delay.msDelay(5000);
		
		m.stop();
		
	}

}

@@ -140,16 +140,19 @@
 .sensor.
+NXT
 LightSen
@@ -777,16 +777,19 @@
 %0D%0A%09%09%0D%0A%09%09
+NXT
 LightSen
@@ -804,16 +804,19 @@
 t = new 
+NXT
 LightSen
@@ -974,32 +974,34 @@
 class));%0D%0A%09%09%0D%0A%09%09
+//
 System.out.print

Comment out broken code