Re: [greenstone-users] calling exportcol.pl in a Java program

From Michael Dewsnip
DateMon, 29 May 2006 10:36:51 +1200
Subject Re: [greenstone-users] calling exportcol.pl in a Java program
In-Reply-To (446D9CA6-9010505-it-iitb-ac-in)
Hi,

The GLI gets around this problem by setting environment variables (and
running setup.bat) in the gli.bat file before the Java code is run. A
couple of possibilities for you:

- Have a batch file run setup.bat before running your program, as the
GLI does
- Create a new batch file that sets the environment variables and then
runs exportcol.pl, and run this from your Java program

Regards,

Michael

Chaitra wrote:

> Hi ,
> Greetings to all Greenstone users!
>
> My program requires me to invoke the "write to CD image" option from
> a Java program. I tried using the "setup.bat" and "perl -S
> exprtcol.pl......" in 2 separate Runtime() objects in Java. The
> problem is that the setup.bat file exits from the thread after
> execution and the next command doesn't execute at all. This problem
> occurs even if I write a batch script where i call setup.bat and then
> run the exportcol.pl command. As an alternative option I tried the
> following command:
> C:> path_to_gsdirbinwindowsperlbinperl -S
> path_to_gsdirbinscriptexportcol.pl -nonetscape collect_name
> This shows a GSDLOS not set error. Do we need to set this variable
> each time we run the perl command?
> I wanted to know if I can use a single line command that can setup the
> greenstone environment as well as run the exportcol.pl script.
>
> Thanks in advance
>
> Regards,
> Chaitra
>
>
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>
>