2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
4 * Copyright (C) 2013 - Scilab Enterprises - Sylvestre Ledru
6 * This file must be used under the terms of the CeCILL.
7 * This source file is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at
10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
14 #include "ScilabJavaEnvironment.hxx"
15 #include "ScilabGateway.hxx"
19 #include "gw_external_objects_java.h"
22 using namespace org_scilab_modules_external_objects_java;
23 using namespace org_modules_external_objects;
25 int sci_jautoUnwrap(char * fname, unsigned long fname_len)
29 const int envId = ScilabJavaEnvironment::start();
30 ScilabJavaEnvironment *javaEnvironment = ScilabJavaEnvironment::getInstance();
33 Scierror(999, "%s: No Java environment available (instance is null).", fname);
37 JavaOptionsSetter setter = javaEnvironment->getOptionsHelper().getSetter(JavaOptionsSetter::AUTOUNWRAP);
38 return ScilabGateway::getsetOptions(fname, envId, setter, pvApiCtx);
40 catch (std::exception & e)
42 Scierror(999, "%s: An error occured: %s", fname, e.what());