help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Problems using glpk from Java


From: glpk xypron
Subject: Re: [Help-glpk] Problems using glpk from Java
Date: Fri, 07 Oct 2011 07:05:14 +0200

Hello Alberto,

> Now it all works well when I run my program from ant but It crashes if I
> run
> it from the Netbeans platform. Does anyone know why this error might come
> up?
> 
> java.lang.UnsatisfiedLinkError: org.gnu.glpk.GLPKJNI.glp_create_prob()J
>     at org.gnu.glpk.GLPKJNI.glp_create_prob(Native Method)
>     at org.gnu.glpk.GLPK.glp_create_prob(GLPK.java:47)
> 

The error means that the dynamic link library (*.so) that has been loaded does 
not contain the method.

It seems that you have indicated to Netbeans a path to a file libglpk-java.so 
that is not the GLPK for Java library.

--

I use Maven for my Netbeans projects.

To my project pom.xml I add the following repository

    <repositories>
        <repository>
            <id>XypronRelease</id>
            <name>Xypron Release</name>
            <url>http://rsync.xypron.de/repository</url>
            <layout>default</layout>
        </repository>
    </repositories>

and the following dependency

    <dependencies>
        <dependency>
            <groupId>org.gnu.glpk</groupId>
            <artifactId>glpk-java</artifactId>
            <version>1.0.18</version>
        </dependency>
    </dependencies>

The binaries are not distributed in the repository because they are machine 
dependent.

If you do not want to download from my repository you can build and install the 
artifact with:

cd glpk-java-1.0.18
make
sudo make install
cd swig
mvn clean install

Maven 3 is required.

The following link might be of interest to you:
http://www.xypron.de/projects/linopt/

Best regards

Xypron

-- 
Follow me at http://twitter.com/#!/xypron

NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!               
Jetzt informieren: http://www.gmx.net/de/go/freephone



reply via email to

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