This week's book giveaway is in the Android forum.
We're giving away four copies of Learning Java by Building Android Games and have Jean-Marcel Belmont on-line!
See this thread for details.
Win a copy of Learning Java by Building Android Games this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Issues Re Environment and Path Variables In Windows XP For JBoss and ANT  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,

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:

%JAVA_HOME%\bin;%ANT_HOME%\bin;%XDOCLET_HOME%;%JBOSS_HOME%\bin

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

Is my path statement correct??

Rgrds and thanks
BB



 
Sheriff
Posts: 21502
96
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try enclosing each of the path parts in quotes:
"%JAVA_HOME%\bin";"%ANT_HOME%\bin";"%XDOCLET_HOME%";"%JBOSS_HOME%\bin"

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.
 
Bruce Berry
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob,

Thanks for your response. I added quotoes to the elenents of my path as you suggested, but I still can't run the ant or jboss batch files anywhere but from their instal directories. I'm stumped.

Thanks
BB
 
Marshal
Posts: 60735
189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds a question more difficult than we usually get on beginners'. Moving.
 
Bruce Berry
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone have any thoughts..I'm completely stalled

Thanks
B
 
author
Bartender
Posts: 3280
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens when you echo this PATH on the command line?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!