GLPK 4.8 Java Interface
I programmed a Java interface for GLPK 4.8. GLPK allows you to solve linear programming (LP) and mixed integer linear programming (MIP) problems. You can solve LP problems using either the revised simplex algorithm or the primal-dual interior point method. The MIP solver is implemented using the branch-and-bound (B&B) technique with a simplex subroutine.
GLPK 4.8 is implemented in ANSI C. The Java interface is provided for Windows and Linux and allows you to use GLPK in Java programs. Even when using GLPK with Java only, you should download the full, original documentation from the GLPK website because my Javadoc can only serve as a complementary reference.
to include GLPK in your project.
When using NetBeans IDE 4.1, you can add the file glpk.jar under "libraries" in the tree of your current project. In Eclipse, you should copy the file to the directory C:\Programme\Java\jdk1.5.0_03\jre\lib (Windows XP) or /usr/lib/j2sdk1.5-sun/jre/lib (Linux) (please adapt it to your exact configuration) or find out a more adequate way. Since I did not use anything specific to Java 1.5, the program should also run under lower versions.
Additionally, you will need to copy the shared library (.dll / .so) to a place where it is found. Under Windows XP, copy the file glpk_jni.dll to the directory of your current project or to C:\Windows. Under Linux, you should copy the file libglpk_jni.so to /usr/lib/j2sdk1.5-sun/jre/lib/i386 (please adapt this to your configuration). I compiled the .so under Debian. If you have any problems and wish to recompile it, please refer to the source files.
For future developments, please refer to these source files and please make the results available to everyone. I offer the GLPK 4.8 JNI in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.