I have written an applet that uses a timer object and timertask object. What I didn't realize right away was that these classes aren't included in java 1.1, so I guess my applet won't work for most people? Am I correct or is there a way to make it work for people still. Is this 1.3 and 1.4 plugin supposed to give the browser the ability to run newer versions of java code? And if so, how do I make my applet use that plugin then to execute? Thanks. PS. If trying to make this work is too complicated, is there another way to accomplish a timertask and timer routine via threads without getting too messy?
One thing you may wish to try is compiling with the target switch: javac -target 1.1 Whatever.java The class file(s) will no doubt be a bit larger, but it should run on any 1.1 or newer JVM version. The documentation for javac can be found at http://java.sun.com/j2se/1.4/docs/tooldocs/windows/javac.html If you try this, I'd be curious if it works (it should) and how much larger the class files become. Good Luck.
Thanks, but unfortunately, that didn't work. It's still looking for the timer class, so it's not going to be compatible with 1.1.
posted 18 years ago
Oh well, it was worth a try. If I were you, and the Timer and TimerTask classes were potentially the only non-Java 1.1 features I wanted to use in my applet, then I'd write my own Timer class so that I weren't bothering my users/customers to have to download and install some plug-in. If you did want to go the plug-in route, then take a look at Sun's Plug-In Page: http://java.sun.com/getjava/download.html and this article by Mark Andrews on the plug-in: http://www.tornadolabs.com/News/Java_Plugin/java_plugin.html and hopefully you'll get an idea of what you need to do. [ June 04, 2002: Message edited by: Dirk Schreckmann ]