RE: TimerTask and Timer - TINIConvertor problems
"Rohan Deshpande" <rohan-TBo7Y5mltt/[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.tini |
|---|---|
| Message-ID | <D6F4CBA5565BED459B5E5921D3870E4C140EBF@netfinity.marlincontrols.com> |
Hi Johannes, Right now, TINIConvertor is looking for Timer/TimerTask in the J2SDK sources since you import java.util.Timer and java.util.TimerTask. Timer.java and TimerTask.java are available in your J2SDK install directory inside src.zip. Extract a copy into your application directory and add them into your own package i.e. change the package statement from package java.util; to package steuerung; Change all your imports from import java.util.TimerTask; import java.util.Timer; to import steuerung.TimerTask; import steuerung.Timer; Thanks, Rohan Deshpande rohan-TBo7Y5mltt/[email protected] -----Original Message----- From: Johannes Rausch [mailto:[email protected]] Sent: Tuesday, March 09, 2004 7:34 PM To: tini-6tN4nzCoH/[email protected] Subject: [TINI]TimerTask and Timer - TINIConvertor problems Hi, I used a timerfunction in my tiniproject. After finishing programming I compiled succesfully all my files in jbuilder and the program worked perfect. For converting I put the TimerTask.class and Timer.class file in my directory, from where I'm converting. I also changed their package statement to my package. While converting with TINIConvertor this occures: Recursing directory: bindir\steuerung Adding file: C:\\bindir\steuerung\steuerung.class Adding file: C:\\bindir\steuerung\writecontrol.class Adding file: C:\\bindir\steuerung\muxselection.class Adding file: C:\\bindir\steuerung\adumrechnung.class Adding file: C:\\bindir\steuerung\run.class Adding file: C:\\bindir\steuerung\Timer$1.class Adding file: C:\\bindir\steuerung\TaskQueue.class Adding file: C:\\bindir\steuerung\Timer.class Adding file: C:\\bindir\steuerung\TimerTask.class Adding file: C:\\bindir\steuerung\TimerThread.class Set mainClassIndex to: 0 Uncaught exception: Class Object for "java/util/TimerTask" not found Class Object for "java/util/TimerTask" not found at com.dalsemi.tiniconvertor.JiBDB.classObject(JiBDB.java:786) at com.dalsemi.tiniconvertor.JiBDB.buildInterfaceClassStrings(JiBDB.java :463) at com.dalsemi.tiniconvertor.JiBDB.buildInterfaceClassStrings(JiBDB.java :465) at com.dalsemi.tiniconvertor.Disassembler.buildInterfaceArray(Disassembl er.java:741) at com.dalsemi.tiniconvertor.Disassembler.doAllModifications(Disassemble r.java:423) at TINIConvertor.getJiBletImage(TINIConvertor.java:135) at TINIConvertor.WriteJiBlet(TINIConvertor.java:340) at TINIConvertor.doBuild(TINIConvertor.java:932) at TINIConvertor.doBuild(TINIConvertor.java:866) at TINIConvertor.main(TINIConvertor.java:1066) at TINIConvertor.main(TINIConvertor.java:957) Exception in thread "main" Class Object for "java/util/TimerTask" not found at com.dalsemi.tiniconvertor.JiBDB.classObject(JiBDB.java:786) at com.dalsemi.tiniconvertor.JiBDB.buildInterfaceClassStrings(JiBDB.java :463) at com.dalsemi.tiniconvertor.JiBDB.buildInterfaceClassStrings(JiBDB.java :465) at com.dalsemi.tiniconvertor.Disassembler.buildInterfaceArray(Disassembl er.java:741) at com.dalsemi.tiniconvertor.Disassembler.doAllModifications(Disassemble r.java:423) at TINIConvertor.getJiBletImage(TINIConvertor.java:135) at TINIConvertor.WriteJiBlet(TINIConvertor.java:340) at TINIConvertor.doBuild(TINIConvertor.java:932) at TINIConvertor.doBuild(TINIConvertor.java:866) at TINIConvertor.main(TINIConvertor.java:1066) at TINIConvertor.main(TINIConvertor.java:957) I`m really scared about that... My source-code looks like that: package steuerung; import java.util.TimerTask; import java.util.Date; import java.util.Timer; import com.dalsemi.system.*; public class steuerung{ public static void main(String[] args)throws Exception{ Date cal = new Date(); cal.setYear(104); cal.setMonth(02); cal.setDate(04); cal.setHours(00); cal.setMinutes(00); cal.setSeconds(00); Timer timer = new Timer(); timer.schedule(new run(), cal, 1000 * 3600); } package steuerung; import java.util.TimerTask; import com.dalsemi.system.*; public class run extends TimerTask { public void run() throws IllegalArgumentException { writecontrol write=new writecontrol(); muxselection mux = new muxselection(); try { mux.muxmain(); } catch (IllegalAddressException ex) { } } }} In case I don`t change the package of Timer and TimerTask.java, I receive a lava.lang.ClassFormatError:Minor version: 3...I use JDK1.4.2_04... Any Ideas? I hope anybody is able to help me. Johannes Rausch, Vienna _______________________________________________ TINI mailing list TINI-6tN4nzCoH/[email protected] To UNSUBSCRIBE, edit your profile, or see list archives: http://lists.dalsemi.com/mailman/listinfo/tini _______________________________________________ TINI mailing list TINI-6tN4nzCoH/[email protected] To UNSUBSCRIBE, edit your profile, or see list archives: http://lists.dalsemi.com/mailman/listinfo/tini