Bhaskar,
Its not possible to write code to do this in java natively (i am open to contrary opinion). The available avenue for you to do this is to do the following:
1. Write a DLL using platform specific compiler that carries out the opening of the file (use VB, VC++, etc) using a simple function name.
2. Create a java class within your application that defines the 'simple function name' defined above as a 'static native' method, and call java.lang.System.loadLibrary(
String) ( probably from within a static initializer block) specifying the DLL filepath/name above to cause the DLL to be loaded into the java process space.
This in effect will link up you java application to call the system specific DLL to render the service you desire. This is the way most developers do it.
Akanimo.
[This message has been edited by Akanimo Udoh (edited July 12, 2001).]