Hi guys ive just started playing with the location api (jsr 179) for j2me, and cant figure out why theres an error, ive used try and catch around the code....
my error message isCode:import javax.microedition.location.*; try { Criteria cr = new Criteria(); cr.setHorizontalAccuracy(500); LocationProvider lp = new LocationProvider.getInstance(cr); Location l = lp.getLocation(60); Coordinates c = l.getQualifiedCoordinates(); if (c != null) { //do something } } catch (LocationException locExc) { System.out.println("Error Getting Location: " + locExc); }
am i doing something very stupid?Code:enu.java:130: unreported exception java.lang.InterruptedException; must be caught or declared to be thrown Location l = lp.getLocation(60); ^ 1 error com.sun.kvem.ktools.ExecutionException
obviously this is only a snip of the code but if you need more just shout! any help would be greatly appreciated,thanks!

Reply With Quote
silly me


