[GRASS-user] grass environment script

maven apache apachemaven0 at gmail.com
Sat Jan 30 04:30:41 EST 2010


Hi:
I am using grass6.4 on xp platform.
I notice that the grass icon in the desktop is a shortcut of grass64.bat
under the grass intall directory. it is "F:\anzhuang\GRASS-6-SVN\grass64.bat
-wxpython"
Then I open the grass64.bat, it just set some GRASS variables and
environment variables. So I think I can create a bat and do some grass
process in the command line manner.

My bat is :
--------------
set GRASSDIR=F:\anzhuang\GRASS-6-SVN

set HOME=%USERPROFILE%

set
PATH=%path%;%GRASSDIR%\bin;%GRASSDIR%\lib;%GRASSDIR%\etc;%GRASSDIR%\extralib;%GRASSDIR%\sqlite\lib;%GRASSDIR%\sqlite\bin;%GRASSDIR%\driver\db;%GRASSDIR%\extrabin;

set GISRC=C:\Documents and Settings\Administrator\.grassrc6
---------------
I save it as grassStart.bat at D driver.

Then I open a new command, run: D:\grassStart.bat, then I use "set " to see
the path variable, the grass variables have been added.

Then I want to run a grass command : r.info ,however it deosnot work. The
error message box can be found here:http://imagebin.org/82527

I hope some one can check it .

In fact what I want to do is set the grass environment variables once the
jvm startup, then I can call grass do some process in java.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20100130/5855bd51/attachment.html


More information about the grass-user mailing list