File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes what are the Threads runs when a java program running? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what are the Threads runs when a java program running?" Watch "what are the Threads runs when a java program running?" New topic
Author

what are the Threads runs when a java program running?

jacob deiter
Ranch Hand

Joined: Apr 02, 2008
Posts: 576
what are the Threads runs when a java program running?
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

well when a program is running, there are threads that we create that are running. If your program is a simple console program, then there is a main thread which executed the main method and other threads that you create in the main thread. Also there are a few daemon threads run by the JVM. I know of one such thread i.e. the garbage collector but I'm sure there would many more like that...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
I've put a code example called ThreadLister in the Code Barn. It enumerates all active threads. If you run that in a GUI app, or a web app, there will be quite a few more threads than if you run it from the command line.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what are the Threads runs when a java program running?
 
Similar Threads
daemon threads
no of threads that runs when u run a java program
IBM mock: Daemon and user thread?
what are daemon threads?
daemon Vs User Thread