logo       

Re: Mac OS X java.library.path: msg#00187

mathematics.lpsolve

Subject: Re: Mac OS X java.library.path

Obviously, your test program is not running code from the
lpsove55j.jar file. Here, you are trying to load the stub library
directly. This is normally done indirectly by the LpSolve.class. Just
compare the stack traces in both cases.

Perhaps there is a misunderstanding. System.loadLibrary loads a
*native* library, not a jar file!

Juergen

--- In lp_solve@xxxxxxxxxxxxxxx, "Whit Nelson" <flipdoubt@...> wrote:
>
> In an attempt to isolate the issue, I created a test program:
>
> class test
> {
> public static void main(String args[])
> {
> System.loadLibrary("lpsolve55j");
> }
> }
>
> It outputs this:
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
lpsolve55j in java.library.path
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517)
> at java.lang.Runtime.loadLibrary0(Runtime.java:788)
> at java.lang.System.loadLibrary(System.java:834)
> at test.main(test.java:7)
>
> Are you quite certain it is running code from the jar file? Thanks,
>
> -- whit
>
> --- In lp_solve@xxxxxxxxxxxxxxx, "Juergen Ebert" <juergen.ebert@> wrote:
> >
> > The jar file is not the problem. The following line from the stack
> > trace shows that you are already excuting code from lpsolve55j.jar.
> >
> > > > at lpsolve.LpSolve.<clinit>(LpSolve.java:274)
> >
> > In fact, you wouldn't even be able to compile the demo program if the
> > jar file wasn't in the classpath (of the compiler). The problem is the
> > native stub library, which cannot be found by the LpSolve class.
> > Remember, in Java the calling sequence is as follows:
> >
> > your Java code -> Classes from lpsolve55.jar --> Native stub library
> > --> lpsolve library
> >
> > So what is missing is still the native library for your platform. As
> > Peter already pointed out, we have precompiled binaries for Win32 and
> > Linux, but not for Mac. You have to do that yourself. The lib/mac
> > directory in the java wrapper distribution contains a script file that
> > you may use as a starter. But please don't ask me about it, I don't
> > know Mac, it was donated by someone else
> >
> > Juergen
> >
> >
> > --- In lp_solve@xxxxxxxxxxxxxxx, John McIntosh <john@> wrote:
> > >
> > > where did you find lpsolve55j.jar?
> > >
> > > John
> > >
> > > On Feb 15, 2006, at 5:20 PM, Whit Nelson wrote:
> > >
> > > > I have been trying for ages to get this thing working correctly.
> > > > When I run it I get the
> > > > following error:
> > > >
> > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: no
> > > > lpsolve55j in java.library.path
> > > > at
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517)
> > > > at java.lang.Runtime.loadLibrary0(Runtime.java:788)
> > > > at java.lang.System.loadLibrary(System.java:834)
> > > > at lpsolve.LpSolve.<clinit>(LpSolve.java:274)
> > > > at Demo.execute(Demo.java:38)
> > > > at Demo.main(Demo.java:281)
> > > >
> > > > I have tried putting lpsolve55j.jar everywhere I can think of.
/usr/
> > > > lib, /usr/local/lib, in the
> > > > same folder with Demo.java. Can anyone help me setup my
> > > > java.library.path properly?
> > > > Thanks.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > SPONSORED LINKS
> > > > Solve debt Computer programming software Solve computer problem
> > > >
> > > > YAHOO! GROUPS LINKS
> > > >
> > > > Visit your group "lp_solve" on the web.
> > > >
> > > > To unsubscribe from this group, send an email to:
> > > > lp_solve-unsubscribe@xxxxxxxxxxxxxxx
> > > >
> > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
> > > >
> > > >
> > >
> >
>










<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise