Lutz,
that was exactly the problem…
I had to set the native library path in eclipse.
Thank you so much for the help.
2013/6/18 Lutz Westermann
Max,
Is it possible that your java.library.path still points to your old Java/api directory (that is the folder that contains the jni libraries)? I am no Eclipse expert, but this is how I execute transport3 from the command line (from C:\GAMS\win64\24.1\apifiles\Java):
java -cp .\api\GAMSJavaAPI.jar;. -Djava.library.path=C:\GAMS\win64\24.1\apifiles\Java\api com.gams.examples.transport.Transport3
If I uses 24.0 in the java.library.path I see the same error you reported.
Hope that helps,
Lutz
On 6/18/2013 6:18 AM, reischl.max@gmail.com wrote:
Hello Lutz, and GAMS users,
of course your suggestion was correct.
I reinstalled Gams manually using administrator mode in windows 7 (which
lets Gams overwrite the old Path variables).
Path Variables now look like this:
GAMSDIR → C:\GAMS\win64\24.1;C:\GAMS\win64\24.1\gbin
Path → %GAMSDIR%;
Some of the Transport examples now run perfectly, like Transport 1 and 2.
Sadly Transport3 and 4 and 11 yield this error:
Exception in thread “main” java.lang.UnsatisfiedLinkError:
com.gams.api.gmd.CheckDomain([J[J[I[J[I[I[Ljava/lang/String;)Z
at com.gams.api.gmd.CheckDomain(Native Method)
at com.gams.api.GAMSDatabase.checkDomains(GAMSDatabase.java:827)
at com.gams.api.GAMSDatabase.export(GAMSDatabase.java:392)
at com.gams.examples.transport.Transport3.main(Transport3.java:30)
Error occurs at
t3.OutDB().export( ws.workingDirectory() + GAMSGlobals.FILE_SEPARATOR +
“tdata.gdx” ); in Transport 3
and at
t4.run(opt, db); in Transport 4
and at
t11.run(opt, db); in Transport 5
and at
db.export(“C:/Users/admin/Documents/gamsdir/projdir/data”); in my own
Program.
I cant really understand the Error Message, and im out of ideas so im
asking for help (again).
Thank you for your kind help.
Max
On Tuesday, June 18, 2013 9:49:51 AM UTC+2, Lutz Westermann wrote:
Hi Max,
It seems as if the GAMS Java API is loading an old version of one of
the
GAMS libraries. On Windows it relies on your PATH variable to find the
correct version and I can reproduce your error here, when I use the
24.1.2 gams.jar but have GAMS 24.0 in my PATH. Could you please
check if
your PATH is set to the new GAMS version?
Best regards,
Lutz
On 6/17/2013 2:50 PM, reisc...@gmail.com wrote:
Hello GAMS users,
after updating Gams to version 24.1.2 and also updating the
gams.jar and
gamsJavaAPI.jar in the eclipse build path, i cant run my programs
anymore.
I updated the jars from
C:\GAMS\win64\24.0\apifiles\Java\api\gams.jar
C:\GAMS\win64\24.0\apifiles\Java\api\GAMSJavaAPI.jar
to
C:\GAMS\win64\24.1\apifiles\Java\api\gams.jar
C:\GAMS\win64\24.1\apifiles\Java\api\GAMSJavaAPI.jar
Even the examples provided with the new release show this error:
Exception in thread “main” com.gams.api.GAMSException: Could not
find
set [*] in database [_gams_java_gdb1]
at com.gams.api.GAMSDatabase.getSet(GAMSDatabase.java:717)
at
com.gams.api.GAMSDatabase.initializeAttributes(GAMSDatabase.java:318)
at com.gams.api.GAMSDatabase.(GAMSDatabase.java:272)
at
com.gams.api.GAMSWorkspace.addDatabaseFromGDX(GAMSWorkspace.java:726)
at
com.gams.api.GAMSWorkspace.addDatabaseFromGDX(GAMSWorkspace.java:703)
at com.gams.api.GAMSJob.run(GAMSJob.java:583)
at com.gams.api.GAMSJob.run(GAMSJob.java:198)
at
com.gams.examples.transport.Transport12.main(Transport12.java:48)
Any advice?
Greetings
Max
–
You received this message because you are subscribed to the Google
Groups “gamsworld” group.
To unsubscribe from this group and stop receiving emails from it,
send
an email to gamsworld+...@googlegroups.com .
To post to this group, send email to gams...@googlegroups.com
.
Visit this group at http://groups.google.com/group/gamsworld
.
For more options, visit https://groups.google.com/groups/opt_out
.
\
Lutz Westermann LWest...@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
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 unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.
\