The Java call System.loadLibrary() is platform dependant so should only need to use System.loadLibrary("MyJNI").
It prepends 'lib' and uses .so suffix on unix and uses the .dll suffix on windows - no prefix. I am surprised that python would not also do this - I think for now I will create my own local UseSWIG-Java module until UseSWIG is all things to all people. Regards Ian -----Original Message----- From: William A. Hoffman [mailto:[EMAIL PROTECTED] Sent: 24 February 2006 13:03 To: Appru, Ian Subject: RE: [CMake] CMake and swig problem At 06:45 AM 2/24/2006, you wrote: >ok I have found the cause of this issue - > >>I am using the UseSWIG module on solaris to configure swig to generate >>a java interface. >>However the C++ jni library generated has file name MyJNI.so rather >>than libMyJNI.so > >The SWIG_ADD_MODULE macro in the UseSWIG.cmake module has the line > > SET_TARGET_PROPERTIES(${SWIG_MODULE_${name}_REAL_NAME} > PROPERTIES PREFIX "") > >Removing this line fixes the problem. >If there is no legitamate reason for this to be there - and I can't >think of one - I'll enter a bug. I think for Python and some other languages where the modules are loaded this is the convention used. The python files generated load "foo.so" and not libfoo.so. What about the java files generated what do they do? -Bill Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake