help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] java.lang.Exception: no glpk_java in java.library.path


From: glpk xypron
Subject: Re: [Help-glpk] java.lang.Exception: no glpk_java in java.library.path
Date: Tue, 13 Apr 2010 07:48:46 +0200

Dear Sana,

please, run

make distclean
make
make check

in the directory to which you extracted glpk-java.

Does the link error occur, you describe, occur when
running make check?

The created dll is in swig/.libs

Run 
ls -la swig/.libs
to see the files created. 

Please, observe libglpk_java.so is only a symbolic link to
libglpk_java.so.0.*.0

When you copy a symbolic link with a relative path it may
point to nothing.

Hence, please, delete the illegal symbolic links you may have
created in you prior experiments:
sudo rm /usr/lib/libglpk_java*
sudo rm /usr/local/lib/libglpk_java*

For installing you should use
sudo make install
which copies the dll to 
/usr/local/lib
and creates symbolic links.

You can specify a directory containing the dynamic link library
by calling Java with parameter:

-Djava.library.path=my_dll_directory

Best regards

Xypron

-------- Original-Nachricht --------
> Datum: Tue, 6 Apr 2010 00:40:39 -0700
> Von: Sana Jawad <address@hidden>
> An: address@hidden
> Betreff: [Help-glpk] java.lang.Exception: no glpk_java in java.library.path

> Hi,
> 
> I am trying to call a model written in MathProg using GLPK in java in
> Ubuntu.
> 
> My code is as follows:
> 
> 
> 
> *try
> *
> 
> {
> 
> System.*loadLibrary*("glpk_java");
> 
> }
> 
> *catch*(UnsatisfiedLinkError e)
> 
> {
> 
> Exception e2= *new* Exception(e1.getMessage() +" JAVA LIBRARAY
> Path:"+System.
> *getProperty*("java.library.path"));
> 
> e2.setStackTrace(e1.getStackTrace());
> 
> e2.printStackTrace();
> 
> *throw* e2;
> 
> }
> 
>   I am getting this exception when I execute this code:
> 
> java.lang.Exception: no glpk_java in java.library.path
> 
> Class
> Path:/usr/lib/jvm/java-6-openjdk/jre/lib/i386/client:/usr/lib/jvm/java-6-openjdk/jre/lib/i386:/usr/lib/jvm/java-6-openjdk/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
>         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1698)
>         at java.lang.Runtime.loadLibrary0(Runtime.java:840)
>         at java.lang.System.loadLibrary(System.java:1047)
> 
> 
> I have downloaded glpk from http://glpk-java.sourceforge.net/#installation
> and
> followed all the instructions in Install files. I have copied
> libglpk_java.so file in usr/lib folder as well (As this path is in the
> java.library.path ). But nothing seems to make a difference.
> 
> Can anyone please help me.
> 
> Thanks in advance,
> 
> Sana

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01




reply via email to

[Prev in Thread] Current Thread [Next in Thread]