openVirus icon indicating copy to clipboard operation
openVirus copied to clipboard

Incorrect CLASSPATH in installation documentation

Open axiomsofchoice opened this issue 4 years ago • 5 comments

In the section run of the file INSTALLING.md it states <mysoftware>/ami3/target/appassembler/bin/ should be added to the CLASSPATH but in fact it should be <mysoftware>/ami3/target/appassembler/repo based on the ami3 README.

axiomsofchoice avatar Mar 24 '20 22:03 axiomsofchoice

Hi /ami3/target/appassembler/repo contains only java jar files. All ami scripts are contained into bin sub-directory.

Proper installation needs building the ami3 i.e configuring the pom.xml. Afterwards, exporting absolute PATH of bin sub-directory.

ambarishK avatar Mar 25 '20 13:03 ambarishK

The CLASSPATH environment variable should point to the location of jars (https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html) so is it required in the general installation? Should these details be removed from the docs?

axiomsofchoice avatar Mar 25 '20 13:03 axiomsofchoice

CLASSPATH environment variables will point to /bin/ sub-directory rather the one containing jar files. Referred document (https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html) is meant to get about setting absolute path to CLASSPATH environment variable. As it is exclusively a java documentation so one may get into repo sub-directory. But it is not so. We have to export the absolute path of ami executables i.e /bin/ sub-directory - /ami3/target/appassembler/bin/.

So, CLASSPATH environment variable has to be set as /ami3/target/appassembler/bin/.

Documentation is perfect to get details for exporting or setting environment CLASSPATH or PATH variable.

ambarishK avatar Mar 25 '20 13:03 ambarishK

bin just contains shell scripts and all of those contain lines such as

if "%REPO%"=="" set REPO=%BASEDIR%\repo

set CLASSPATH="%BASEDIR%"\etc;"%REPO%"\*

So as far as I can see setting CLASSPATH directly has no value since it gets clobbered by the scripts anyway. It's not a major issue but it could be confusing.

axiomsofchoice avatar Mar 25 '20 14:03 axiomsofchoice

if "%REPO%"=="" set REPO=%BASEDIR%\repo

set CLASSPATH="%BASEDIR%"\etc;"%REPO%"\*

These are JVM parameters. Once the software is configured it will be set for the local environment.

Here CLASSPATH is a JVM parameter- reference. JRE uses it to access the java classes. It is not exactly same as set environment PATH variable for exporting ami scripts i.e executables (confirmation required from PMR). If so CLASSPATH should be mentioned as PATH over installation documentation - installation.md.

ambarishK avatar Mar 25 '20 15:03 ambarishK