ok,i dont have much information on this but the below shown links may help you to understand,when java acts as platform independent,try to read the first link till the end,may be this will clear your concept.Both the articles are useful. 1)http://java.sun.com/docs/books/tutorial/getStarted/intro/definition.html 2)http://www.artima.com/insidejvm/ed2/platindep3.html
now about the thread being os dependent the link shown below will help you atleast to some extent to understand the concept.may be it proves beneficial to you.
Originally posted by vijay joseph: can any one tell me ,when java is platform independent?how thread is os dependent? thanks in advance
This is true for many parts in Java. The "platform independent" moniker just means that you need to only compile once, and it will run anywhere.
But how it run does have some subtle differences. In the case of threading, the fine details of schedulling is passed to the underlying os. This is why you should never assume an order of execution, or who gets a syncrhonization lock, or a type of schedulling, in your Java application.