• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with timer object in applet

 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
tyler jones
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic