I am attempting to set up JBoss 4.0.2, ANT 1.6.5 and Xdoclet 1.2.3 on Windows XP to begin working through the examples in the O'Reily JBoss at Work book. I'm having issues running ANT and starting JBoss at a Windows cmd prompt from anywhere other than their respective install directories
I have installed all of the above software successfully and can get JBoss to start by invoking run.bat in the jboss-4.0.2\bin directory. My user environment variables for Java, ANT and JBoss are as follows:
ANT_HOME C:\Program Files\apache-ant-1.6.5
JBOSS_HOME C:\Program Files\jboss-4.0.2
JAVA_HOME C:\Program Files\Java\j2sdk1.4.2_19
The "end" of my Path system environment variable is as follows:
When I try and do "ant -version" or "run" at a cmd prompt (anywhere other than the install directories for ANT and JBoss) I get a "is not recognized as a internal or external etc" error. I can do java -version from any directory and that works fine. I have echoed all of the variable values and they seem right, instal directories match with the user variables. I have restarted XP serveral times
Try enclosing each of the path parts in quotes:
Because most (or even all) have a space in the path, the path variable stops at the first space - not the end of what you specified it to be*. By enclosing each of these in quotes you solve this issue.
You'll probably have to do the same for all other paths in your path variable.
* Actually, some programs can deal with this, but especially Ant seems to have problems with it.