On Windows, even if JAVA is installed and on the PATH, GRASS GIS may still not be able to find it. The reason is that OSGeo4W environment used by GRASS GIS on Windows has its own shell environment, which may not automatically inherit the system-wide PATH or environment variables from Windows. As a result, even if Java is correctly installed and accessible from a regular Command Prompt or PowerShell, it might not be visible to GRASS GIS within the OSGeo4W shell.
To enable GRASS GIS to find the path to the Java executable, you can set the path to the executable using the java parameter. The path will be written to a text file in the GRASS GIS addon directory, which can be used by the r.maxent.train and r.maxent.predict modules.
An arguably better but more involved way is to add the Java directory to the OSGeo4W PATH. See the NOTES for a short 'how to'.
set PATH=C:\Program Files\Java\jdk-XX.X.X\bin;%PATH%
Replace C:\Program Files\Java\jdk-XX.X.X\bin with your Java installation path. To make this change persistent, you need to edit the osgeo4w.bat file. This file can be found in the OSGeo4W installation folder. Locate the file, and find the line that starts with set PATH=.
At the end of that line, add a semi-colun and the path to the Java installation path. For example:
set PATH=%PATH%;C:\Program Files\Java\jdk-XX.X.X\bin;
Replace C:\Program Files\Java\jdk-XX.X.X\bin with your Java installation path. Save the file and restart the OSGeo4W shell. Note that you may need administrator rightrs to edit the osgeo4w.bat file.
HAS green academy University of Applied Sciences
Innovative
Biomonitoring research group
Climate-robust
Landscapes research group
Available at: r.maxent.setup source code (history)
Latest change: Sunday Nov 17 17:00:54 2024 in commit: 98393ab8a50f6a43692b7597c1a11fa9eef2c529
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
© 2003-2024 GRASS Development Team, GRASS GIS 8.4.1dev Reference Manual