hi mou haj:
Maybe I can help you .
you can build a dll file on windows.
so the step on Solaris is very similar!
On Solaris, the following command builds a shared library example: libhello.so:
cc -G -I/usr/local/java/include -I/usr/local/java/include/solaris \
HelloWorldImp.c -o libhello.so
After you do that,you can invoke the native method in java.
If you see an exception like the following, then you don't have your library path set up correctly.
java.lang.UnsatisfiedLinkError: no hello in shared library path
use the following to set your library path.
% setenv LD_LIBRARY_PATH mylibrarypath
where mylibrarypath is the name of the directory that contains libhello.so.