Original Post
I don't know if this is the right forum for this, but . . . I'm a C programmer who recently decided to try out the J2ME side of things. I hardly know Java or these libraries, and there's this bit of code that keeps turning up a problem. I'd been consulting the Wells book on J2ME game programming and used that code as a reference but couldn't see where my problem lay. Google didn't help either. So I'm asking someone here. The compiler keeps turning up a simple "error verifying class" The code causing the problems is public void run(){ StartTime = System.currentTimeMillis(); renderer.repaint(); //SNIP Timelapsed = System.currentTimeMillis() - StartTime; //The line below is the one that turns up the error if(Timelapsed < 20){ try{Thread.sleep(20-Timelapsed);} catch(java.lang.InterruptedException e){} } } //starttime and timelapsed are longs