Re: [Jepp-users] no jep in java.library.path
Brought to you by:
mrjohnson0
From: Nathan J. <ndj...@gm...> - 2015-05-13 12:31:58
|
Hi, The UnsatisifiedLinkError means that it can't find the native shared library for Jep. The name of that library depends on the operating system, on Linux it is libjep.so, on OS X it is jep.so or libjep.jnilib, and on Windows it's jep.dll. If you don't have that anywhere, then you need to build the library using setup.py. Once you have the library and its location, there's a few different ways you can tell Java/Jep where it's at. On Linux you can set the LD_LIBRARY_PATH environment variable to include the directory that has libjep.so. On Windows I think you set the PATH environment variable to include that location. You can also tell the JVM where to look for native libraries with the java.library.path property. See http://examples.javacodegeeks.com/java-basics/java-library-path-what-is-it-and-how-to-use/ Hope that helps! Nathan On Tue, May 12, 2015 at 11:08 PM, Oleg Nikitin <ole...@gm...> wrote: > Hello! > > I'm trying to run sample jepp code: > > package jepexample; > > import java.util.logging.Level; > import java.util.logging.Logger; > import jep.Jep; > import jep.JepException; > > /** > * > * @author sganapat > */ > public class Main { > private Jep objJep; > > > Main() { > try { > objJep = new Jep(); > } catch (JepException ex) { > Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); > } > } > /** > * @param args the command line arguments > */ > public static void main(String[] args) { > > try { > > Main main = new Main(); > > main.executeCommand(); > > main.executeScript(); > } catch (JepException ex) { > Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); > } > > } > > /** > * Executes Python Commands > * @throws JepException > */ > private void executeCommand() throws JepException { > > objJep.eval("print 'Hello Java'"); > > } > > /** > * Executes Python Script > */ > private void executeScript() throws JepException { > > > objJep.runScript("/home/boka/NetBeansProjects/HelloWorld/src/helloworld.py"); > > } > > } > > I am importing jep.jar to the project libraries, but it still gives me an > error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: no jep in > java.library.path > > Can somebody help me please? I'm struggling with a problem for two days > with no solution. > > Oleg. > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > Jepp-users mailing list > Jep...@li... > https://lists.sourceforge.net/lists/listinfo/jepp-users > > |