New release Problem in Java

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


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.

\

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, reischl.max@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+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.


\

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.


\

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


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.

\

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


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+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.


\

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.


\

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


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+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.



\

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


You received this message because you are subscribed to a topic in the Google Groups “gamsworld” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gamsworld/0wPE5lcIt2Q/unsubscribe.
To unsubscribe from this group and all its topics, 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.


\

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.

\

Dear GAMS users,

I am a brand new user of GAMS and would like to learn how to link it to java.
I have a problem when i start following instruction on gams java api tutorial.
I have the following error message when i ran an example transport1.java.

Exception in thread “main” com.gams.api.GAMSException: GAMS system directory is both not specified and not found from your environment!
at com.gams.api.GAMSWorkspace.verifySystemDirectory(GAMSWorkspace.java:562)
at com.gams.api.GAMSWorkspace.initializeAttributes(GAMSWorkspace.java:329)
at com.gams.api.GAMSWorkspace.(GAMSWorkspace.java:313)
at com.gams.api.GAMSWorkspace.(GAMSWorkspace.java:169)
at com.gams.examples.transport.Transport1.main(Transport1.java:20)

Could anyone help me to address the problem?

Yohanes

On Tuesday, 18 June 2013 03:49:51 UTC-4, 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


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/d/optout.

Yohannes,

As the error message says, your system directory is not specified. This can be done in different ways depending on your operating system. You should find the relevant instructions in the beginning of the tutorial in the section “Setting Up Your Environment”:

http://www.gams.com/dd/docs/api/java/_j_a_v_a__t_u_t_o_r_i_a_l.html#SETUPENV

I hope, that helps!
Lutz




On 1/23/2015 7:04 PM, Yohanes Kristianto Nugroho wrote:

Dear GAMS users,

I am a brand new user of GAMS and would like to learn how to link it to
java.
I have a problem when i start following instruction on gams java api
tutorial.
I have the following error message when i ran an example transport1.java.

Exception in thread “main” com.gams.api.GAMSException: GAMS system
directory is both not specified and not found from your environment!
at com.gams.api.GAMSWorkspace.verifySystemDirectory(GAMSWorkspace.java:562)
at com.gams.api.GAMSWorkspace.initializeAttributes(GAMSWorkspace.java:329)
at com.gams.api.GAMSWorkspace.(GAMSWorkspace.java:313)
at com.gams.api.GAMSWorkspace.(GAMSWorkspace.java:169)
at com.gams.examples.transport.Transport1.main(Transport1.java:20)

Could anyone help me to address the problem?

Yohanes

On Tuesday, 18 June 2013 03:49:51 UTC-4, 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


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+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/d/optout.



Lutz Westermann LWestermann@gams.com
GAMS Development Corporation GAMS Software GmbH
1217 Potomac St. NW, P.O. Box 40 59
Washington DC, 20007, USA 50216 Frechen, Germany
Fon/Fax: +1 202 342-0180/1 Fon/Fax: +49 221 949-9170/1
http://www.gams.com


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/d/optout.