It's not about OS. It's how you compile your Java code. Have you enabled the "debug" flag during compilation of the code? Without that, information like line numbers aren't maintained and will not be available at runtime.
Thanks Jaikiran, we are using Ant to build our application, can you please suggest me how to enable debug flag in it.