Originally posted by amit bhadre:
In JNI to run class file in any OS we use runtime.exec() method ...told.
How to use it and when to use?
Not really sure what you are asking... so apologies if this doesn't apply.
JNI and Runtime.exec() are two different things. JNI is used to interface to a native library -- a DLL for Windows and a shared library for Unix. And Runtime.exec() is a method that allows you to call a program in the OS.
The only relation that I can think of is... maybe Runtime uses JNI under the covers. For you,
you should use JNI, if you have a library that you need to interface to, and Runtime.exec(), if you have a program that you want to call.
Henry