2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) INRIA - Allan CORNET
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13 /*--------------------------------------------------------------------------*/
18 #include "addToLibrarypath.h"
19 #include "getLibrarypath.h"
20 #include "localization.h"
21 #include "freeArrayOfString.h"
22 /*--------------------------------------------------------------------------*/
23 int sci_javalibrarypath(char *fname,unsigned long fname_len)
35 Strings=getLibrarypath(&nbRow);
36 CreateVarFromPtr( Rhs+1,MATRIX_OF_STRING_DATATYPE, &nbRow, &nbCol,Strings );
39 freeArrayOfString(Strings,nbRow*nbCol);
44 if ( GetType(1) == sci_strings )
49 char **libraryPaths=NULL;
51 GetRhsVar(1,MATRIX_OF_STRING_DATATYPE,&m1,&n1,&libraryPaths);
53 for (i = 0; i<m1*n1 ;i++)
55 bOK=addToLibrarypath(libraryPaths[i]);
58 Scierror(999,_("%s: Could not add path to java.library.path: %s.\n"),fname, libraryPaths[i]);
59 freeArrayOfString(libraryPaths,m1*n1);
64 freeArrayOfString(libraryPaths,m1*n1);
69 Scierror(999,_("%s: Wrong type for input argument #%d: String expected.\n"), fname,1);
74 /*--------------------------------------------------------------------------*/