|
Re: How to run Real time java program on XP
|
Posted: Aug 5, 2008 7:05 AM
|
|
hello . I Have one problem in Real-time programs by Java. I have install Netbean5 and Real-time module and then write this simple example : //------------------------------ package rtj2; import javax.realtime.*;
class Demo{ public static void main(String args[]){ AbsoluteTime oldTime, newTime; RelativeTime interval; try{ Clock clock = Clock.getRealtimeClock(); oldTime = clock.getTime(); oldTime = new AbsoluteTime(System.currentTimeMillis(),0); System.out.println(oldTime); Thread.sleep(1000); newTime = clock.getTime(); System.out.println(newTime); interval = newTime.subtract(oldTime); }catch(InterruptedException e){ } } } //------------------------------------- if debug this project this message is appear:
init: compile: Compiling 1 source file to D:\Arshad project\J-proj\RT_Clock\build\classes java.lang.NoClassDefFoundError: javax/realtime/Clock Exception in thread "main" Java Result: 1 debug: BUILD SUCCESSFUL (total time: 2 seconds)
and if Run this project this message is appear and this program isn't Run correctly :
init: compile: Building jar: D:\Arshad project\J-proj\RT_Clock\dist\RT_Clock.jar jar: run: FAILONERROR is false TEST_MODE is false EXECUTION_MODE is true Deployment data missing. Set up a deployment profile in Tools/Java Platform Manager. Remote session finished. BUILD SUCCESSFUL (total time: 0 seconds)
please help me as soon as posible , to run real-time java programs in netbean5. thank you
|
|