Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java.util.TimerTask  RSS feed

 
dale conn
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there can anyone tell me what jar file the above comes from?

many thanks
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Like all the standard Java API classes, it's in rt.jar (JDKDIR/jre/lib/rt.jar).

Why do you want to know, may I ask?
 
dale conn
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a timer thread class that works on my local pc but when i put the class on a development server, the code doesn't work

i'm getting no error messages, so it's hard to track were it's bombing out and it's annoying me

if i comment the line of code out that creates a timer thread then it's fine, so i've narrowed it down to the timer thread class the only thing i can think of is the difference between the jars on my loacl pc and the dev. server
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anything that starts with "java.*" is always in rt.jar. For "javax.*", it might be in rt.jar, or it might not be; this is unfortunate.

But if you look at the Javadocs for java.util.TimerTask, you see that this class was introduced in JDK 1.3. If your server is running 1.2.x, then it won't be there, but you should see a NoClassDefFoundError.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!