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
- Create a new batch file that sets the environment variables and then
runs exportcol.pl, and run this from your Java program
> 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
> greenstone-users mailing list