Using GAMS in JSP Project

Hello everyone,

I’m currently working on a JSP-Project facing some linear programming
problems. We are currently trying to evaluate if it is possible to use
the GAMS solver to solve these problems.

So my question is: Is it possible to call GAMS solver functionality
from Java projects under the condition of staying platform
independent? And if this is possible: What are the steps that need to
be done?

I’ve found the GDX API already, but it looks to me that some platform
independency problems could occur when using this, since it simply
consists of a dll with a jni wrapper. But maybe I just get this wrong,
since I’m not really firm with jni.

I’m really hoping for some informative answers on this one… :slight_smile:

\

Hey,

You are right, that the Java interface that comes with GAMS relies on a JNI DLL, so a different library is required on each platform. However, with the recent GAMS version you will find the compiled JNI library required for the system you downloaded in the distribution. This means that you will get, e.g., gdxjni.dll with a 32 bit Windows system, on 64 bit Linux you will have libgdxjni64.so and so on. The Java interface file itself (gdx.java) is the same on all platforms and inside it, it is taken care about using the correct JNI. If you look in your GAMS system directory at apifiles/examples/example2.java you will find a small example that calls GAMS from Java and this is the same for all platforms.

I hope that helps,
Lutz


MKoerner wrote:

Hello everyone,

I’m currently working on a JSP-Project facing some linear programming
problems. We are currently trying to evaluate if it is possible to use
the GAMS solver to solve these problems.

So my question is: Is it possible to call GAMS solver functionality
from Java projects under the condition of staying platform
independent? And if this is possible: What are the steps that need to
be done?

I’ve found the GDX API already, but it looks to me that some platform
independency problems could occur when using this, since it simply
consists of a dll with a jni wrapper. But maybe I just get this wrong,
since I’m not really firm with jni.

I’m really hoping for some informative answers on this one… :slight_smile:


Lutz Westermann LWestermann@gams.com
GAMS Development Corporation GAMS Software GmbH
1217 Potomac St. NW, Eupener Str. 135-137
Washington DC, 20007, USA 50933 Cologne, Germany
Fon/Fax: +1 202 342-0180/1 Fon/Fax: +49 221 949-9170/1
http://www.gams.com http://www.gams.de


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\